Last modified: 2014-10-16 12:15: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
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.