|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #35175 Wrong parameter count warning should include docref urls
Submitted: 2005-11-09 21:36 UTC Modified: 2012-06-05 23:04 UTC
From: subscription at nazarenko dot net Assigned:
Status: Duplicate Package: Scripting Engine problem
PHP Version: * OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: subscription at nazarenko dot net
New email:
PHP Version: OS:


 [2005-11-09 21:36 UTC] subscription at nazarenko dot net
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 = ""
docref_ext = ".php"

And then the test script:




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=''>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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-09 21:44 UTC]
This is not a bug, but a change request.
 [2011-01-02 02:24 UTC]
-Summary: Not all function names are changed to documentation links in error messages +Summary: Wrong parameter count warning should include docref urls -Package: Feature/Change Request +Package: Scripting Engine problem -Operating System: SuSE Linux 10.0 +Operating System: * -PHP Version: 5CVS-2005-11-09 (snap) +PHP Version: *
 [2012-06-05 23:04 UTC]
-Status: Open +Status: Duplicate
 [2012-06-05 23:04 UTC]
Closing as duplicate of
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 22 20:01:29 2024 UTC