|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-08-20 14:49 UTC] vrana@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 12:00:02 2025 UTC |
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; }