Description
xdebug
seems to handle 0
as well as "0"
values as null
values if it is enabled and PhpStorm actively listens to incoming connections.
If xdebug
is enabled but PhpStorm doesn't listen to connections ("the debugger is disabled" - so to speak), the website works perfectly fine.
If xdebug
is disabled and PhpStorm doesn't listen to connections, the website works perfectly fine.
Example
This results in different errors in a Magento 2 project. And it seems this primarily occurs in PHPs magic functions like __call
(\Magento\Framework\DataObject::__call
). But that's just a guess and really hard to say as I'm always getting the right values if every step is debugged (0
stays 0
).
I'm working on a Ubuntu machine with a PHP docker container.
php -v
outputs the following information:
PHP 8.1.12 (cli) (built: Oct 28 2022 17:39:37) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.12, Copyright (c) Zend Technologies
with Zend OPcache v8.1.12, Copyright (c), by Zend Technologies
with Xdebug v3.1.5, Copyright (c) 2002-2022, by Derick Rethans
xdebug
is configured as follows:
zend_extension=xdebug.so
xdebug.mode = debug
xdebug.start_with_request = default
xdebug.client_host = "${HOST_IP}"
xdebug.client_port = 9000
xdebug.discover_client_host = false
xdebug.idekey = "PHPSTORM"
; xdebug error handling
xdebug.force_display_errors = 0
xdebug.halt_level = 0
xdebug.show_error_trace = 0
xdebug.show_exception_trace = 0
xdebug.scream = 0
xdebug.max_nesting_level = 512
Are there any known bugs or fixes for this issue?