From:             glowacki at europa dot pl
Operating system: all
PHP version:      Irrelevant
PHP Bug Type:     Documentation problem
Bug description:  mistakes in examples ingres-ii:  ingres-error.xml, 
ingres-errsqlstate.xml

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;
}



-- 
Edit bug report at http://bugs.php.net/?id=42327&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=42327&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=42327&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=42327&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=42327&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=42327&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=42327&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=42327&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=42327&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=42327&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=42327&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=42327&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=42327&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=42327&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=42327&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=42327&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=42327&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=42327&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=42327&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=42327&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=42327&r=mysqlcfg

Reply via email to