-
-
Notifications
You must be signed in to change notification settings - Fork 200
Open
Description
Using json_encode without JSON_THROW_ON_ERROR masks invalid JSON data. This in turn leads to invalid JS being generated (opstate: ,) and a blank page. For me the data is invalid because of the error Inf and NaN cannot be JSON encoded.
Improving encoding with flags, e.g., json_encode($opcache->getData(), JSON_THROW_ON_ERROR | JSON_PARTIAL_OUTPUT_ON_ERROR), finally works.
A big problem here (FrankenPHP) seems to be that opcache_get_configuration() doesn't make a lot of sense, $config['directives'['opcache.memory_consumption'] seems to always report 0 for example.
Probably related: php/php-src#16927
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels