On October 29, 2002 09:52 am, Marcus Boerger wrote:
> I think we need to discuss the behaviour of run-tests.php
> according too error/warning handling a bit.
> First question (let me know if i am wrong): Any error/warning/
> notice in a test result is either expected or a real error.

Agreed, however in 99% of the cases the data which is being outputted is what 
matters. As long as it is the same data as the one we expect, all the 
warnings/notices are irrelevant, imho. That said, ideally the tests should 
not cause warnings/notices, unless of course, the purpose of the test is to 
see if a warning/notice message will be generated. In the event a needed 
warning is generated, the track_errors & $php_errormsg facility should be 
used to display the error (we already enable tracking of errors by default). 
Adding @ to block the errors is not a good approach imho, the warning should 
be displayed and accounted for in the expected output.

> Remark 1: "auto_append_file=" & "auto_prepend_file=" currently do not work
> but that is
> another thread.

Seems to work just fine here.

> Remark 2: We could instead use the log_errors and direct them to the output
> with the following changes to above settings:
> display_errors=0
> log_errors=1
> The output would be nicer but when we go to test other sapis than CGI/CLI
> this won't
> work anymore.

The tests can only be performed using the cgi/cli sapis since they require a 
command line PHP binary. So, this is a non-issue. If we must display error 
messages then I would prefer using display_errors=1 instead of log_errors=1.


PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to