Edit report at https://bugs.php.net/bug.php?id=35175&edit=1
ID: 35175 Updated by: [email protected] Reported by: subscription at nazarenko dot net Summary: Wrong parameter count warning should include docref urls -Status: Open +Status: Duplicate Type: Feature/Change Request Package: Scripting Engine problem Operating System: * PHP Version: * Block user comment: N Private report: N New Comment: Closing as duplicate of https://bugs.php.net/bug.php?id=32217. Previous Comments: ------------------------------------------------------------------------ [2005-11-09 21:44:35] [email protected] This is not a bug, but a change request. ------------------------------------------------------------------------ [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 https://bugs.php.net/bug.php?id=35175&edit=1
