errors spawn MessageBox, which blocks test automation
| Bug #55541 | errors spawn MessageBox, which blocks test automation | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2011-08-30 20:21 UTC | Modified: | 2014-12-03 15:02 UTC |
|
||||||
| From: | yaauie@php.net | Assigned: | ||||||||
| Status: | Closed | Package: | Output Control | |||||||
| PHP Version: | trunk-SVN-2011-08-30 (snap) | OS: | Win32 | |||||||
| Private report: | No | CVE-ID: | None | |||||||
[2011-08-30 20:21 UTC] yaauie@php.net
Description: ------------ Calls to the Win32 API MessageBox block automated testing. When the automation is spawned by a timed script, that script does not have access to the UI to close these messages. 3 places where MessageBox is called: Zend/zend_ini_parser.y:179 - instead of printing an INI parse error to stderr, *always* when PHP_WIN32 is defined. This means that the test suite does not catch the error on Windows machines (example parse error directive `php -n -d foo="a=href"`) and execution of automated tests is blocked until a user can click through. - example main/main.c:984 - in addition to other logging, but only if display_startup_errors is true and the error type is either E_CORE_WARNING or E_CORE_ERROR. - since display_startup_errors is set to true by the testing suite (and is required for many tests to pass), I cannot disable it. Perhaps a new ini directive should be created instead of having this one overloaded? sapi/cgi/cgi_main.c:1768 - only when PHP_DEBUG is defined. I don't have a big problem with this, since it is debug code, but perhaps it too could be governed by an ini directive. Test script: --------------- pass a deliberately-defective ini directive: `php -n -d a=b=c -v` Expected result: ---------------- --STDERR-- php: syntax error, unexpected '=' in Unknown on line 7 --STDOUT-- PHP 5.5.0-dev (cli) (built: Aug 30 2011 18:14:14) Copyright (c) 1997-2011 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2011 Zend Technologies Actual result: -------------- --BLOCKING-MESSAGEBOX-- --------------------------- PHP Error --------------------------- syntax error, unexpected '=' in Unknown on line 7 --------------------------- OK --------------------------- --STDERR--(nothing) --STDOUT-- PHP 5.5.0-dev (cli) (built: Aug 30 2011 18:14:14) Copyright (c) 1997-2011 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2011 Zend Technologies
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2014-12-03 15:02 UTC] ab@php.net
[2014-12-03 15:50 UTC] ab@php.net
-Status: Open +Status: Closed