Index: trunk/phase3/includes/Title.php |
— | — | @@ -1253,7 +1253,8 @@ |
1254 | 1254 | |
1255 | 1255 | /** |
1256 | 1256 | * Is this title subject to title protection? |
1257 | | - * @return array An associative array representing any existent title protection. |
| 1257 | + * @return mixed An associative array representing any existent title |
| 1258 | + * protection, or false if there's none. |
1258 | 1259 | */ |
1259 | 1260 | public function getTitleProtection() { |
1260 | 1261 | $dbr = wfGetDB( DB_SLAVE ); |
— | — | @@ -2305,7 +2306,7 @@ |
2306 | 2307 | } |
2307 | 2308 | } else { |
2308 | 2309 | $tp = $nt->getTitleProtection(); |
2309 | | - if (!$wgUser->isAllowed($tp['pt_create_perm'])) { |
| 2310 | + if ( $tp and !$wgUser->isAllowed( $tp['pt_create_perm'] ) ) { |
2310 | 2311 | return 'cantmove-titleprotected'; |
2311 | 2312 | } |
2312 | 2313 | } |
— | — | @@ -2906,4 +2907,4 @@ |
2907 | 2908 | return Namespace::isContent( $this->getNamespace() ); |
2908 | 2909 | } |
2909 | 2910 | |
2910 | | -} |
\ No newline at end of file |
| 2911 | +} |