Last modified: 2014-10-16 12:15:56 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T52739, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50739 - PHP errors during replacement: Call to a member function getArticleID() on a non-object
PHP errors during replacement: Call to a member function getArticleID() on a ...
Status: UNCONFIRMED
Product: MediaWiki extensions
Classification: Unclassified
ReplaceText (Other open bugs)
REL1_18-branch
All All
: Lowest normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-04 11:47 UTC by Gerald Schneider
Modified: 2014-10-16 12:15 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Gerald Schneider 2013-07-04 11:47:56 UTC
I've been trying to prepend all pages with a text.

Usage:

Search text: (.*)
New text: {{templatename}}\n\n$1
Use regular expression [x]

This resulted in a memory error:
PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 268709 bytes) in /srv/www/htdocs/mediawiki_dev/extensions/ReplaceText/SpecialReplaceText.php on line 554

After increasing the memory maximum in php to 512MB I got another error:
PHP Fatal error:  Call to a member function getArticleID() on a non-object in /srv/www/htdocs/mediawiki_dev/extensions/ReplaceText/SpecialReplaceText.php on line 443
Comment 1 Sam Reed (reedy) 2013-07-04 15:21:06 UTC
Line 143:

foreach ( $res as $row ) {
	$title = Title::makeTitleSafe( $row->page_namespace, $row->page_title );
	$context = $this->extractContext( $row->old_text, $this->target, $this->use_regex );
	$titles_for_edit[] = array( $title, $context );
}

Title::makeTitleSafe() can (and will) return null on error. The extension doesn't cater/check for or handle this.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links