I have some functions that i wrote that use $wgArticle->exists() to determine whether a page exists. These functions are called by my skin and are used to build the interface.
Since upgrading from 1.5 to 1.6.3 these functions return fatal errors (Call to a member function exists() on a non-object) whenever they are called from a Special Page. I am guessing that this because the Special Page is not an article. However this worked fine in 1.5.
I can test for the Special namespace before using $wgArticle->exists () to avoid getting errors but i'm curious ... Has something changed between 1.5 and 1.6 that would change the behaviour of $wgArticle-
exists() on Special Pages?
I've looked through the release notes for 1.6 and couldn't see anything that applied.
thanks
a@kid wrote:
I have some functions that i wrote that use $wgArticle->exists() to determine whether a page exists. These functions are called by my skin and are used to build the interface.
Since upgrading from 1.5 to 1.6.3 these functions return fatal errors (Call to a member function exists() on a non-object) whenever they are called from a Special Page. I am guessing that this because the Special Page is not an article. However this worked fine in 1.5.
I can test for the Special namespace before using $wgArticle->exists () to avoid getting errors but i'm curious ... Has something changed between 1.5 and 1.6 that would change the behaviour of $wgArticle-
exists() on Special Pages?
Yes, the initialization is a bit different. It may or may not be a bug, but $wgArticle doesn't really make sense for special pages.
Use $wgTitle instead.
-- brion vibber (brion @ pobox.com)
mediawiki-l@lists.wikimedia.org