Errors in php 5.0.4 Not in 4.3.10-16
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Errors in php 5.0.4 Not in 4.3.10-16

From: Han Koster <han+at+kosterwieringa+dot+nl>
Date: Wed Nov 30 2005 - 09:52:24 CET

I use the following statements:

$var = "";
$var = $_POST('varname');

In php 4, when 'varname' was not defined, $var remained an empty string;
In php 5, I suddenly get errors.

I solved these by including the function array_key_exist to check the
occurence of 'varname'
Is this the prefered way or is ther a better solution?

Thanx,
Han koster
Received on Sat Dec 3 04:24:34 2005