From: Platonides Date: Thu, 9 Jun 2011 19:57:10 +0000 (+0000) Subject: If this was ever passed an empty string it would spit "PHP Notice: Uninitialized... X-Git-Tag: 1.31.0-rc.0~29607 X-Git-Url: http://git.cyclocoop.org/wiki/Target_page?a=commitdiff_plain;h=7eb228b5cbf37ed341e544c11cd782c3347f46df;p=lhc%2Fweb%2Fwiklou.git If this was ever passed an empty string it would spit "PHP Notice: Uninitialized string offset: 0..." --- diff --git a/includes/db/DatabaseMysql.php b/includes/db/DatabaseMysql.php index 2b32fd0f87..759d1ac188 100644 --- a/includes/db/DatabaseMysql.php +++ b/includes/db/DatabaseMysql.php @@ -330,7 +330,7 @@ class DatabaseMysql extends DatabaseBase { } public function isQuotedIdentifier( $name ) { - return $name[0] == '`' && substr( $name, -1, 1 ) == '`'; + return strlen($name) && $name[0] == '`' && substr( $name, -1, 1 ) == '`'; } function ping() {