Bug #80394 [NEW]: Fatal error when using cakephp/chronos with preload
| From: | dsechgh at gmail dot com | Date: | Fri, 20 Nov 2020 22:30:23 +0000 |
| Subject: | Bug #80394 [NEW]: Fatal error when using cakephp/chronos with preload | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-230491@lists.php.net to get a copy of this message | ||
From: dsechgh at gmail dot com
Operating system: docker/debian/alpine
PHP version: 7.4.12
Package: opcache
Bug Type: Bug
Bug description:Fatal error when using cakephp/chronos with preload
Description:
------------
When trying to instantiate a Chronos object and preload is enabled,
there seems to be a nonsensical fatal error. This happens since
php7.4.12, previous php7.4 versions don't have this issue.
To reproduce:
> composer require cakephp/chronos:2.0.6
> php -dopcache.enable_cli=1 -dopcache.preload=preload.php index.php
Fatal error: Only variables can be passed by reference in
/var/www/html/index.php on line 5
In case this is relevant - I used the official php docker images +
opcache module, and composer version 2.0.7
Test script:
---------------
// preload.php
<?php
require __DIR__ . '/vendor/autoload.php';
// index.php
<?php
require __DIR__ . '/vendor/autoload.php';
$date = Cake\Chronos\Chronos::createFromFormat(DATE_RFC3339_EXTENDED,
'2020-11-20T21:00:00.000Z');
Expected result:
----------------
-- no error
Actual result:
--------------
Fatal error: Only variables can be passed by reference in
/var/www/html/index.php on line 5
--
Edit bug report at https://bugs.php.net/bug.php?id=80394&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80394&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80394&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80394&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80394&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80394&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80394&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80394&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80394&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80394&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80394&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80394&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80394&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80394&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80394&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80394&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80394&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80394&r=mysqlcfg