|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-12-27 12:17 UTC] nikic@php.net
[2017-12-27 12:52 UTC] stephan dot lueckl at niceshops dot com
[2021-07-07 10:48 UTC] cmb@php.net
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: cmb
[2021-07-07 10:48 UTC] cmb@php.net
[2021-07-18 04:22 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 05:00:01 2025 UTC |
Description: ------------ Some examples from the error log (error log is full with this): 1) PHP Fatal error: Uncaught TypeError: Argument 1 passed to ServiceDb_Session::__construct() must be an instance of DB_Generated_ShopWAWIProduct, instance of ServiceDb_Connection given, called in Factory.php on line 25 and defined in Session.php:41 2) PHP Fatal error: Uncaught TypeError: Argument 1 passed to ServiceDb_Session::__construct() must be an instance of Smarty_Internal_Template, instance of ServiceDb_Connection given, called in Factory.php on line 25 and defined in Session.php:41 3) PHP Fatal error: Uncaught TypeError: Argument 1 passed to ServiceDb_Session::__construct() must be an instance of ServiceDb_Connection, instance of ServiceDb_Connection given, called in Factory.php on line 25 and defined in Session.php:41 The session classes are part of an overwritten session handler, that implements the SessionHandlerInterface. You can see - the method signature of the class somehow is corrupted (interesting in example 3: expectation and actual value is equal) This happens after we reinvalidate the opcache via files (reinvalidation script below) - within the reinvalidation this type of session with the overwritten sessionhandler is started. At the moment this problem only occurs within this session classes. As this happens once - all requests to the server are having this error (the overwritten session system is used in every case). Problem can be fixed by calling opcache_reset(); This problem did not occur prior to PHP 7.1.9 Test script: --------------- Method Signature class ServiceDb_Connection { /** * @var ServiceDb_Connection */ private $connection; public function __construct(ServiceDb_Connection $connection) { $this->connection = $connection; } } Opcache Invalidation Script (invalidates the cache from the project base root): $opStatus = opcache_get_status(true); if (is_array($opStatus["scripts"])) { foreach ($opStatus["scripts"] as $file => $info) { if (strpos($file,BASE_ROOT) === 0) { opcache_invalidate($file); } } }