php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #24321 Documentation mistake for yp_err_string()
Submitted: 2003-06-24 14:16 UTC Modified: 2003-06-25 06:27 UTC
From: niklas at zim dot goe dot net Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.3.1 OS: SuSE 8.2 (Linux 2.4.20, gcc 3.3)
Private report: No CVE-ID: None
 [2003-06-24 14:16 UTC] niklas at zim dot goe dot net
Description:
------------
The doc for yp_err_string() says:

  yp_err_string --  Returns the error string associated with 
  the previous operation
  Description
  string yp_err_string ( void)

which is obviously wrong, as the code below shows.

I think it is meant to be something like

  yp_err_string --  Returns the error string associated with
  the given error code
  Description
  string yp_err_string (int errorCode)

because yp_err_string(yp_errno()) just works fine.

Best regards
  Niklas

Reproduce code:
---------------
$yp = @yp_match("nomap", "norDomain");
if (!$yp) {
  echo "Error: " . yp_err_string();
}


Expected result:
----------------
printout:

  Error: Can't bind to server which serves this domain 

Actual result:
--------------
printout:

  Warning: Wrong parameter count for yp_err_string()

Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-25 06:27 UTC] didou@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Aug 17 00:01:29 2024 UTC