r27756 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r27755‎ | r27756 | r27757 >
Date:15:23, 22 November 2007
Author:catrope
Status:old
Tags:
Comment:
EditOwn: Fixing PHP warning when $wgEditOwnExcludedNamespaces is not set or not an array
Modified paths:
  • /trunk/extensions/EditOwn/EditOwn.php (modified) (history)

Diff [purge]

Index: trunk/extensions/EditOwn/EditOwn.php
@@ -38,6 +38,9 @@
3939 {
4040 static $cache = array();
4141 global $wgEditOwnExcludedNamespaces;
 42+ if(!is_array($wgEditOwnExcludedNamespaces))
 43+ // Prevent PHP from whining
 44+ $wgEditOwnExcludedNamespaces = array();
4245
4346 if($action != 'edit' || $user->isAllowed('editall') || in_array($title->getNamespace(), $wgEditOwnExcludedNamespaces))
4447 {

Status & tagging log