From 14939d9853ad50d26f24518cc1d5f6f628d80dc9 Mon Sep 17 00:00:00 2001 From: Daniel Friesen Date: Thu, 8 May 2008 09:29:48 +0000 Subject: [PATCH] Ahh great. I mixed up my definition of preg_match's output and thought it was the one to return an offset, and false on failure. --- includes/Database.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Database.php b/includes/Database.php index c8711374d9..f2bb4ba569 100644 --- a/includes/Database.php +++ b/includes/Database.php @@ -1380,7 +1380,7 @@ class Database { # Note that we use a whitespace test rather than a \b test to avoid # any remote case where a word like on may be inside of a table name # surrounded by symbols which may be considered word breaks. - if( preg_match( '/(^|\s)(JOIN|ON)(\s|$)/i', $name ) !== false ) return $name; + if( preg_match( '/(^|\s)(JOIN|ON)(\s|$)/i', $name ) !== 0 ) return $name; # Split database and table into proper variables. # We reverse the explode so that database.table and table both output -- 2.20.1