note 93864 added to function.hexdec
| From: | hertsch at berlin dot de | Date: | Sun, 04 Oct 2009 16:38:19 +0000 |
| Subject: | note 93864 added to function.hexdec | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-161262@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 69.147.83.197
Probable Submitter: 188.102.100.36
----
Manual Page -- http://www.php.net/manual/en/function.hexdec.php
Edit -- https://master.php.net/note/edit/93864
Del: integrated -- https://master.php.net/note/delete/93864/integrated
Del: useless -- https://master.php.net/note/delete/93864/useless
Del: bad code -- https://master.php.net/note/delete/93864/bad+code
Del: spam -- https://master.php.net/note/delete/93864/spam
Del: non-english -- https://master.php.net/note/delete/93864/non-english
Del: in docs -- https://master.php.net/note/delete/93864/in+docs
Del: other reasons-- https://master.php.net/note/delete/93864
Reject -- https://master.php.net/note/reject/93864
Search -- https://master.php.net/manage/user-notes.php