Skip to content

Commit 439ab5d

Browse files
committed
Rewrite SQL mode determination query read inside connect()
Fixes issue #10: Call to undefined function rdbms\mysqlx\this()
1 parent e9988ab commit 439ab5d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/php/rdbms/mysqlx/MySqlxConnection.class.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,8 @@ public function connect($reconnect= false) {
9393
// - See: http://bugs.mysql.com/bug.php?id=10214
9494
// - Possible values: http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html
9595
// "modes is a list of different modes separated by comma (,) characters."
96-
$modes= array_flip(explode(',', this(this($this->handle->consume($this->handle->query(
97-
"show variables like 'sql_mode'"
98-
)), 0), 1)));
96+
$query= $this->handle->consume($this->handle->query("show variables like 'sql_mode'"));
97+
$modes= array_flip(explode(',', $query[0][1]));
9998
} catch (IOException $e) {
10099
// Ignore
101100
}

0 commit comments

Comments
 (0)