From: umherirrender Date: Wed, 16 May 2012 19:14:40 +0000 (+0200) Subject: empty string test for old page_restricions entries X-Git-Tag: 1.31.0-rc.0~23597 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=7b8e963c8899d0791ab7a6a90a43d684244e1823;p=lhc%2Fweb%2Fwiklou.git empty string test for old page_restricions entries some old page_restricions entries are move=:edit=, which result in any empty string as level in the JS var wgRestrictionEdit Checking wgRestrictionEdit.length is than not possible Change-Id: I250b4f9bda60361d4cd8c3139b17b299fec0a718 --- diff --git a/includes/Title.php b/includes/Title.php index 4f0a897433..cf428f918b 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2555,7 +2555,10 @@ class Title { $this->mRestrictions['edit'] = explode( ',', trim( $temp[0] ) ); $this->mRestrictions['move'] = explode( ',', trim( $temp[0] ) ); } else { - $this->mRestrictions[$temp[0]] = explode( ',', trim( $temp[1] ) ); + $restriction = trim( $temp[1] ); + if( $restriction != '' ) { //some old entries are empty + $this->mRestrictions[$temp[0]] = explode( ',', $restriction ); + } } }