ID:               35175
 Updated by:       [EMAIL PROTECTED]
 Reported By:      subscription at nazarenko dot net
 Status:           Open
-Bug Type:         PHP options/info functions
+Bug Type:         Feature/Change Request
 Operating System: SuSE Linux 10.0
 PHP Version:      5CVS-2005-11-09 (snap)
 New Comment:

This is not a bug, but a change request.


Previous Comments:
------------------------------------------------------------------------

[2005-11-09 21:36:15] subscription at nazarenko dot net

Description:
------------
When 'html_errors=On' and 'docref_root' and 'docref_ext' are set, not
all warnings/errors become html links to the documentation.

It seems that the warnings about wrong function arguments do not
generate html links, whereas failed function calls with the properly
given arguments do so.

Reproduce code:
---------------
A fragment of php.ini:

error_reporting  =  E_ALL|E_STRICT
display_errors = On
html_errors = On
docref_root = "http://de.php.net/manual/en/";
docref_ext = ".php"


And then the test script:

<?php

str_replace('one','two');
mysqli_connect('fake');

?>

Produces this html:

<br />
<b>Warning</b>:  Wrong parameter count for str_replace() in
<b>x.php</b> on line <b>3</b><br />

<br />
<b>Warning</b>:  mysqli_connect() [<a
href='http://de.php.net/manual/en/function.mysqli-connect.php'>function.mysqli-connect.php</a>]:
(HY000/2005): Unknown MySQL server host 'fake' (1) in <b>x.php</b> on
line <b>4</b><br />


Expected result:
----------------
I think it would be MUCH more useful for a developer to get links to
the documentation when there are inconsistencies in a function
arguments (and such), rather than when the function call actually
failed with the properly specified arguments.

When the function returns an error or warning it is often 'too late' to
look into the documentation. On the other hand, very often an error is
made in a number/order/type of function arguments, i.e. before the
function is called, which is when the documentation is very handy.





------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=35175&edit=1

Reply via email to