Last modified: 2012-05-27 23:54:14 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 T39123, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 37123 - [SWL] [Patch] 0.1; Catchable fatal error: Argument 1 passed to SMWDIWikiPage::newFromTitle()
[SWL] [Patch] 0.1; Catchable fatal error: Argument 1 passed to SMWDIWikiPage:...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
SemanticWatchlist (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-26 00:40 UTC by MWJames
Modified: 2012-05-27 23:54 UTC (History)
1 user (show)

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


Attachments
Add a check in ApiQuerySemanticWatchlist.php to bailout or continue (576 bytes, application/octet-stream)
2012-05-26 00:40 UTC, MWJames
Details

Description MWJames 2012-05-26 00:40:39 UTC
Created attachment 10656 [details]
Add a check in ApiQuerySemanticWatchlist.php to bailout or continue

Error message

Catchable fatal error: Argument 1 passed to SMWDIWikiPage::newFromTitle() must be an instance of Title, null given, called in ...\extensions\SemanticWatchlist\includes\SWL_ChangeSet.php on line 80 and defined in ...\extensions\SemanticMediaWiki\includes\dataitems\SMW_DI_WikiPage.php on line 137

Problem analysis
A watched page has been deleted and Title::newFromID( $set->edit_page_id ) fails because the page does not exists any more.

Solution 
Check before SWLChangeSet::newFromDBResult( $set ) is called if Title::newFromID( $set->edit_page_id ) results in an object or is empty.
Comment 1 Jeroen De Dauw 2012-05-27 23:54:14 UTC
Awesome, thanks for the fix.

Gerrit change #9108

Looking at that code I now realize it really is not structured for efficiency... doing way to much queries while it could batch :)

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


Navigation
Links