note 93864 rejected from function.hexdec by danbrown

From: Date: Mon, 05 Oct 2009 14:35:07 +0000
Subject: note 93864 rejected from function.hexdec by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-161362@lists.php.net to get a copy of this message
Note Submitter: hertsch at berlin dot de ---- There is an error in the function rgb2hex2rgb($c): <?php }elseif (eregi("^[0-9]+(,| |.)+[0-9]+(,| |.)+[0-9]+$", $c)){ $spr = str_replace(array(',',' ','.'), ':', $c); $e = explode(":",$c); ?> must be: <?php }elseif (eregi("^[0-9]+(,| |.)+[0-9]+(,| |.)+[0-9]+$", $c)){ $spr = str_replace(array(',',' ','.'), ':', $c); $e = explode(":",$spr); ?> otherwise the str_replace will be obsolete and the function always return false.

« previous php.notes (#161362) next »