note 98522 added to function.empty

From: Date: Sun, 20 Jun 2010 21:00:16 +0000
Subject: note 98522 added to function.empty
Groups: php.notes 
Request: Send a blank email to php-notes+get-170335@lists.php.net to get a copy of this message
For everyone who is offering functions to replace empty() please remember that php will report an "Undefined variable" warning when you try to call a function with an unset variable. The only safe way to do it is to use <?php if(isset($var)){call_function_to_replace_empty($var);} ?> ---- Server IP: 89.185.144.38 Probable Submitter: 86.43.117.247 ---- Manual Page -- http://www.php.net/manual/en/function.empty.php Edit -- https://master.php.net/note/edit/98522 Del: integrated -- https://master.php.net/note/delete/98522/integrated Del: useless -- https://master.php.net/note/delete/98522/useless Del: bad code -- https://master.php.net/note/delete/98522/bad+code Del: spam -- https://master.php.net/note/delete/98522/spam Del: non-english -- https://master.php.net/note/delete/98522/non-english Del: in docs -- https://master.php.net/note/delete/98522/in+docs Del: other reasons-- https://master.php.net/note/delete/98522 Reject -- https://master.php.net/note/reject/98522 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#170335) next »