|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2019-10-07 15:11 UTC] nikic@php.net
[2019-10-08 07:10 UTC] shaun at shaunfreeman dot name
[2021-09-09 10:44 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 15:00:02 2025 UTC |
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