Last modified: 2008-08-11 15:00: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 T16813, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 14813 - revision getPrevious() getNext()
revision getPrevious() getNext()
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://svn.wikimedia.org/viewvc/media...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-14 13:24 UTC by Fabio Gandola
Modified: 2008-08-11 15:00 UTC (History)
2 users (show)

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


Attachments

Description Fabio Gandola 2008-07-14 13:24:45 UTC
Fatal error: Call to a member function getPreviousRevisionID() on a non-object

Line 560 & 573

560 : 	  	  	 $prev = $this->getTitle()->getPreviousRevisionID( $this->getId() );

573 : 	  	  	 $next = $this->getTitle()->getNextRevisionID( $this->getId() );

I think that getTitle doesn't give a Revision object, and calling on it getPreviousRevisionID and getNextRevisionID maybe is wrong.
Comment 1 Roan Kattouw 2008-07-14 13:28:32 UTC
(In reply to comment #0)
> Fatal error: Call to a member function getPreviousRevisionID() on a non-object
> 
> Line 560 & 573
> 
> 560 :                    $prev = $this->getTitle()->getPreviousRevisionID(
> $this->getId() );
> 
> 573 :                    $next = $this->getTitle()->getNextRevisionID(
> $this->getId() );
> 
> I think that getTitle doesn't give a Revision object, and calling on it
> getPreviousRevisionID and getNextRevisionID maybe is wrong.
> 

Actually, getPreviousRevisionID() and getNextRevisionID() are Title members. The problem is that $this->getTitle() doesn't return an object ("on a non-object"), so stuff goes wrong when calling getPrevious() or getNext() on Revision objects that don't have valid associated Title objects.
Comment 2 Aaron Schulz 2008-08-11 15:00:14 UTC
Fixed in r35180 

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


Navigation
Links