From 0e2426cc655578e4d9a4f3c68b113a8a58da62fe Mon Sep 17 00:00:00 2001 From: Nick Jenkins Date: Mon, 4 Dec 2006 11:28:48 +0000 Subject: [PATCH] E_STRICT minor tweaks: * Strict Standards: Undefined index: currevisionid in includes/Skin.php on line 287 * Strict Standards: Undefined index: oldid in includes/Skin.php on line 288 [ Repo above with error_logging(E_ALL | E_STRICT) in LocalSettings.php, and a non-default skin, e.g: http://localhost/wiki/index.php?title=Main_Page&useskin=nostalgia ] * Strict Standards: is_a(): Deprecated. Please use the instanceof operator in includes/UserMailer.php on line 42 --- includes/Skin.php | 4 +++- includes/UserMailer.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/Skin.php b/includes/Skin.php index ab695df056..45e8f2803d 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -300,7 +300,7 @@ class Skin extends Linker { function getHeadScripts() { global $wgStylePath, $wgUser, $wgAllowUserJs, $wgJsMimeType, $wgStyleVersion; global $wgArticlePath, $wgScriptPath, $wgServer, $wgContLang, $wgLang; - global $wgTitle, $wgCanonicalNamespaceNames, $wgOut; + global $wgTitle, $wgCanonicalNamespaceNames, $wgOut, $wgArticle, $wgRequest; $ns = $wgTitle->getNamespace(); $nsname = isset( $wgCanonicalNamespaceNames[ $ns ] ) ? $wgCanonicalNamespaceNames[ $ns ] : $wgTitle->getNsText(); @@ -317,6 +317,8 @@ class Skin extends Linker { 'titleprefixeddbkey' => $wgTitle->getPrefixedDBKey(), 'titletext' => $wgTitle->getText(), 'articleid' => $wgTitle->getArticleId(), + 'currevisionid' => isset( $wgArticle ) ? $wgArticle->getLatest() : 0, + 'oldid' => $wgRequest->getVal( 'oldid' ), 'isarticle' => $wgOut->isArticle(), 'username' => $wgUser->isAnon() ? NULL : $wgUser->getName(), 'userlang' => $wgLang->getCode(), diff --git a/includes/UserMailer.php b/includes/UserMailer.php index a982439567..0101f74412 100644 --- a/includes/UserMailer.php +++ b/includes/UserMailer.php @@ -39,7 +39,7 @@ class MailAddress { * @param string $name Human-readable name if a string address is given */ function MailAddress( $address, $name=null ) { - if( is_object( $address ) && is_a( $address, 'User' ) ) { + if( is_object( $address ) && $address instanceof User ) { $this->address = $address->getEmail(); $this->name = $address->getName(); } else { -- 2.20.1