Closed jimsafley closed 13 years ago
Scripto_Service_MediaWiki::getRevisions() returns the following array when a page is not yet created:
Scripto_Service_MediaWiki::getRevisions()
( [query] => Array ( [pages] => Array ( [-1] => Array ( [ns] => 0 [title] => .MQ.Ng [missing] => ) ) ) )
Check for this response in Scripto_Document::_getPageHistory() and return an empty array before the foreach(). Otherwise calls to the function using an uncreated page result in an "Invalid argument supplied for foreach()" warning.
Scripto_Document::_getPageHistory()
Scripto_Service_MediaWiki::getRevisions()
returns the following array when a page is not yet created:Check for this response in
Scripto_Document::_getPageHistory()
and return an empty array before the foreach(). Otherwise calls to the function using an uncreated page result in an "Invalid argument supplied for foreach()" warning.