Skip to content

Commit

Permalink
Use === to avoid suprises with numeric table names
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed Dec 14, 2016
1 parent 715bdf3 commit eec9d3f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libraries/DatabaseInterface.php
Expand Up @@ -2626,7 +2626,8 @@ public function getFieldsMeta($result)
* match existing strings
*/
foreach ($result as $value) {
if (strlen($value->orgtable) !== 0 && mb_strtolower($value->orgtable) == mb_strtolower($value->table)) {
if (strlen($value->orgtable) !== 0 &&
mb_strtolower($value->orgtable) === mb_strtolower($value->table)) {
$value->orgtable = $value->table;
}
}
Expand Down

0 comments on commit eec9d3f

Please sign in to comment.