php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #42327 mistakes in examples ingres-ii: ingres-error.xml, ingres-errsqlstate.xml
Submitted: 2007-08-17 12:39 UTC Modified: 2007-08-20 14:49 UTC
From: glowacki at europa dot pl Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: all
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: glowacki at europa dot pl
New email:
PHP Version: OS:

 

 [2007-08-17 12:39 UTC] glowacki at europa dot pl
Description:
------------
mistakes in examples
en/reference/ingres-ii/functions/ingres-error.xml
en/reference/ingres-ii/functions/ingres-errsqlstate.xml


Reproduce code:
---------------
file: en/reference/ingres-ii/functions/ingres-error.xml
...
$error_text = ingres_error();
if ( is_null($error_text) ) {
   echo "An error occured - " . $error_text;
}
// ingres_error() return NULL if no error has occurred.
// function is_null() return TRUE if ingres_error() return NULL.
// 'if statement' is TRUE and print "An error occured - "
----------------------------------------
file: en/reference/ingres-ii/functions/ingres-errsqlstate.xml
...
$error_sqlstate = ingres_errsqlstate();
if ( is_null($error_sqlstate) ) {
   echo "An error occured - " . $error_sqlstate;
}
// ingres_errsqlstate() return NULL if no error SQLSTATE has occurred.
// function is_null() return TRUE if ingres_errsqlstate() return NULL.
// 'if statement' is TRUE and print "An error occured - "


Expected result:
----------------
file: en/reference/ingres-ii/functions/ingres-error.xml
...
$error_text = ingres_error();
if ( !is_null($error_text) ) {
   echo "An error occured - " . $error_text;
}
----------------------------------------
file: en/reference/ingres-ii/functions/ingres-errsqlstate.xml
...
$error_sqlstate = ingres_errsqlstate();
if ( !is_null($error_sqlstate) ) {
   echo "An error occured - " . $error_sqlstate;
}



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-20 14:49 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Nov 19 12:00:02 2025 UTC