Page MenuHomePhabricator

SpamBlacklist_body Revision 1.17
Closed, DeclinedPublic

Description

Author: wallingconsulting

Description:
Fatal error: Undefined class name 'revision' in
/home/myseattl/public_html/mediawiki/extensions/SpamBlacklist/SpamBlacklist_body.php
on line 174

Using

MediaWiki (http://wikipedia.sf.net/): 1.4.4 
PHP (http://www.php.net/): 4.3.11 (apache) 
MySQL (http://www.mysql.com/): 4.0.25-standard

I modified line 171
from this:
if ( $dbr->tableExists( 'page' ) ){
to this:
if ( $dbr->tableExists( 'page' ) && class_exists('Revision') ){

Please add a patch to the sourceforge version.
http://cvs.sourceforge.net/viewcvs.py/wikipedia/extensions/SpamBlacklist/SpamBlacklist_body.php?rev=1.17&view=log

John Walling

http://meta.wikimedia.org/wiki/User:Jwalling


Version: unspecified
Severity: normal
OS: Linux
URL: http://www.myseattle.com/mediawiki/index.php

Details

Reference
bz4833

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:03 PM
bzimport set Reference to bz4833.
bzimport added a subscriber: Unknown Object (MLST).

MediaWiki 1.4 doesn't have a page table, so this shouldn't ever come up.

wallingconsulting wrote:

It should never come up, and yet it did. Please explain.(In reply to comment #1)

MediaWiki 1.4 doesn't have a page table, so this shouldn't ever come up.

The patch for forking between schema 1.5 and 1.4 causes a fatal error as it is
designed in the current version. Even though the page table doesn't exist in
1.4, the logic flows up to the point where a fatal error occurs because the
class 'Revision' doesn't exist. How can you say something is not an issue when a
fatal error saying "Hell no! I'm not executing this code"?

John Walling

a) What is "forking between schema 1.5 and 1.4"?

b) The code you quoted above will always evaluate to false if there is
not a 'page' table. If there is not a page table, you're running 1.4 or
earlier and there is no Revision class either. If there is a page table,
either you are running 1.5 or later, and you have a Revision class, or
something is damaged about your installation.

So, is your installation damaged or is there something else wrong?

wallingconsulting wrote:

(In reply to comment #3)

a) What is "forking between schema 1.5 and 1.4"?

b) The code you quoted above will always evaluate to false if there is
not a 'page' table. If there is not a page table, you're running 1.4 or
earlier and there is no Revision class either. If there is a page table,
either you are running 1.5 or later, and you have a Revision class, or
something is damaged about your installation.

So, is your installation damaged or is there something else wrong?

If you say it's damaged it must be damaged. I got the code working with my patch
so nothing else is at issue. Cancel the bug report.

John Walling