Index: trunk/phase3/includes/db/DatabaseMysql.php |
— | — | @@ -114,8 +114,10 @@ |
115 | 115 | $this->query( 'SET NAMES utf8', __METHOD__ ); |
116 | 116 | } |
117 | 117 | // Set SQL mode, default is turning them all off, can be overridden or skipped with null |
118 | | - if (is_string($wgSQLMode)) { |
119 | | - $this->query( "SET sql_mode = '$wgSQLMode'", __METHOD__ ); |
| 118 | + global $wgSQLMode; |
| 119 | + if ( is_string( $wgSQLMode ) ) { |
| 120 | + $mode = $this->addQuotes( $wgSQLMode ); |
| 121 | + $this->query( "SET sql_mode = $mode", __METHOD__ ); |
120 | 122 | } |
121 | 123 | } |
122 | 124 | |