Uncreated pages have no page history #18

Closed
jimsafley opened this Issue May 26, 2011 · 0 comments

Projects

None yet

1 participant

@jimsafley

Scripto_Service_MediaWiki::getRevisions() returns the following array when a page is not yet created:

(
  [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.

@jimsafley jimsafley closed this in f1e237f May 26, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment