diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index aa0c560d..a5e74de0 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -36,7 +36,7 @@ jobs: with: php-version: ${{ matrix.php-version }} extensions: intl, mysqli, oauth - ini-values: error_reporting=-1, memory_limit=512M, post_max_size=256M, xdebug.mode="debug,coverage,develop" + ini-values: error_reporting=-1, memory_limit=512M, post_max_size=256M, xdebug.mode="coverage,debug,develop" coverage: xdebug #optional - name: Check PHP Version run: | diff --git a/src/Debug/Abstraction/Object/Subscriber.php b/src/Debug/Abstraction/Object/Subscriber.php index da3a7abe..17227743 100644 --- a/src/Debug/Abstraction/Object/Subscriber.php +++ b/src/Debug/Abstraction/Object/Subscriber.php @@ -227,15 +227,19 @@ private function onStartMysqli(Abstraction $abs) test if stat() throws an error (ie "Property access is not allowed yet") if so, don't collect property values */ - \set_error_handler(static function ($errno, $errstr) { - throw new RuntimeException($errstr, $errno); // @codeCoverageIgnore + $haveError = false; + \set_error_handler(static function ($errno, $errstr) use (&$haveError) { + $haveError = true; }, E_ALL); try { $mysqli = $abs->getSubject(); $mysqli->stat(); } catch (Error $e) { - $abs['collectPropertyValues'] = false; + $haveError = true; } catch (RuntimeException $e) { + $haveError = true; + } + if ($haveError) { $abs['collectPropertyValues'] = false; } \restore_error_handler();