Bug #78639 [NEW]: mysql_xdevapi\CollectionFind::limit returns bool with Zend OPcache enabled

From: Date: Sun, 06 Oct 2019 19:26:07 +0000
Subject: Bug #78639 [NEW]: mysql_xdevapi\CollectionFind::limit returns bool with Zend OPcache enabled
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-223100@lists.php.net to get a copy of this message
From: shaun at shaunfreeman dot name Operating system: Ubuntu 18.04 PHP version: 7.3.10 Package: MySQL related Bug Type: Bug Bug description:mysql_xdevapi\CollectionFind::limit returns bool with Zend OPcache enabled Description: ------------ I have come across a bug when OPcache is enabled. I am using Ubuntu 18.04 and PHP 7.3.10. When OPcache is enabled then mysql_xdevapi\CollectionFind::limit and mysql_xdevapi\CollectionFind::offset return bool instead of an mysql_xdevapi\CollectionFind instance. When OPcache is not loaded then I get the expected result. I am running PHP-FPM on a unix socket with Nginx My configure command is ./configure --prefix=/usr/local/php7.3 \ --with-config-file-path=/usr/local/php7.3/etc \ --with-config-file-scan-dir=/usr/local/php7.3/etc/conf.d \ --disable-cgi \ --enable-fpm \ --enable-bcmath \ --with-curl \ --enable-exif \ --with-gd \ --with-freetype-dir \ --with-jpeg-dir \ --with-png-dir \ --enable-intl \ --enable-mbstring \ --enable-mysqlnd \ --with-mysqli \ --with-pdo-mysql \ --with-mysql-sock=/var/run/mysqld/mysqld.sock \ --with-openssl \ --with-tidy=/usr/local \ --enable-zip \ --with-libzip \ --with-zlib \ --with-zlib-dir Test script: --------------- $session = getSession("mysqlzx://dbuser:!OneTwo3@localhost:33060"); $schema = $session->getSchema('dbname'); $collection = $schema->getCollection('posts'); $result = $collection->find() ->offset(0) ->limit(2) ->execute(); print "<pre>"; print_r($result->fetchAll()); Expected result: ---------------- Array ( [0] => Array ( [_id] => 02eb5585a3d74645883b200caa70852f [title] => Title 1 [author] => Shaun Freeman [content] => Content 1 [dateCreated] => Array ( [date] => 2019-10-06 17:30:15.466565 [timezone] => UTC [timezone_type] => 3 ) ) [1] => Array ( [_id] => 40089f7d6154426cb28300d05d1ace5c [title] => Title 3 [author] => Shaun Freeman [content] => Content 3 [dateCreated] => Array ( [date] => 2019-10-06 17:30:59.344370 [timezone] => UTC [timezone_type] => 3 ) ) ) Actual result: -------------- Fatal error: Uncaught Error: Call to a member function limit() on bool in /home/projects/public/expressive-xdevapi-demo/public/xdevapi.php:20 Stack trace: #0 {main} thrown in /home/projects/public/expressive-xdevapi-demo/public/xdevapi.php on line 20 -- Edit bug report at https://bugs.php.net/bug.php?id=78639&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=78639&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=78639&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=78639&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=78639&r=needscript Try newer version: https://bugs.php.net/fix.php?id=78639&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=78639&r=support Expected behavior: https://bugs.php.net/fix.php?id=78639&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=78639&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=78639&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=78639&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=78639&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=78639&r=dst IIS Stability: https://bugs.php.net/fix.php?id=78639&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=78639&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=78639&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=78639&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=78639&r=mysqlcfg

« previous php.bugs (#223100) next »