Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Factbox.php |
— | — | @@ -39,8 +39,9 @@ |
40 | 40 | * Initialisation method. Must be called before anything else happens. |
41 | 41 | */ |
42 | 42 | static function initStorage($title) { |
43 | | - // reset only if title is new and not the notorious NO TITLE thing the MW parser creates |
44 | | - if ( $title->getText() == 'NO TITLE' ) return; |
| 43 | + // reset only if title exists, is new and is not the notorious |
| 44 | + // NO TITLE thing the MW parser creates |
| 45 | + if ( $title === NULL || $title->getText() == 'NO TITLE' ) return; |
45 | 46 | if ( (SMWFactbox::$semdata === NULL) || |
46 | 47 | (SMWFactbox::$semdata->getSubject()->getDBkey() != $title->getDBkey()) || |
47 | 48 | (SMWFactbox::$semdata->getSubject()->getNamespace() != $title->getNamespace()) ) { |