Revert "Only pass strings to mysqli::real_escape_string"
authorChad <chadh@wikimedia.org>
Mon, 10 Feb 2014 19:58:22 +0000 (19:58 +0000)
committerChad <chadh@wikimedia.org>
Mon, 10 Feb 2014 19:58:22 +0000 (19:58 +0000)
hhvm already has a patch in master for fixing this, making the workaround unnecessary

This reverts commit de808f57a90c9c6f7bc4dbc4e4b544a07e0daa0f.

Change-Id: I504e5bd5025ec12430ce670e05da0158b06822c9

includes/db/DatabaseMysqli.php

index 290de1f..d41f3e4 100644 (file)
@@ -274,10 +274,6 @@ class DatabaseMysqli extends DatabaseMysqlBase {
         * @return string
         */
        protected function mysqlRealEscapeString( $s ) {
-               if ( is_integer( $s ) ) {
-                       // HHVM fatals passing numbers to real_escape_string
-                       $s = (string) $s;
-               }
                return $this->mConn->real_escape_string( $s );
        }