X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flibs%2Frdbms%2Fdatabase%2FDatabaseSqlite.php;h=2b0660707c6c934d1d14ce2e549ddaa3a73a16cc;hb=732b5e2745ca8f6153e19cc10c3c9acb1b2a6331;hp=870fc3eeca5da794ff177af0bb7d8bfdc36deb0a;hpb=64b83bdb3afd0ee4f8fc1893a865409c198e601e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/rdbms/database/DatabaseSqlite.php b/includes/libs/rdbms/database/DatabaseSqlite.php index 870fc3eeca..2b0660707c 100644 --- a/includes/libs/rdbms/database/DatabaseSqlite.php +++ b/includes/libs/rdbms/database/DatabaseSqlite.php @@ -790,7 +790,7 @@ class DatabaseSqlite extends Database { return "x'" . bin2hex( $s->fetch() ) . "'"; } elseif ( is_bool( $s ) ) { return (int)$s; - } elseif ( strpos( $s, "\0" ) !== false ) { + } elseif ( strpos( (string)$s, "\0" ) !== false ) { // SQLite doesn't support \0 in strings, so use the hex representation as a workaround. // This is a known limitation of SQLite's mprintf function which PDO // should work around, but doesn't. I have reported this to php.net as bug #63419: @@ -806,9 +806,9 @@ class DatabaseSqlite extends Database { 'For consistency all binary data should have been ' . 'first processed with self::encodeBlob()' ); - return "x'" . bin2hex( $s ) . "'"; + return "x'" . bin2hex( (string)$s ) . "'"; } else { - return $this->mConn->quote( $s ); + return $this->mConn->quote( (string)$s ); } }