ID: 11918
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: Scripting Engine problem
Operating system: win2k
PHP Version: 4.0.6
Description: d'oh
and
1) $pos is not === FALSE
2) the vars $pos, $string and $accessKey are not used anyhow else or anywhere else in
that scope (method), and not included using global
3) if i 'initialise' $pos somehow
---cut---
$pos = 'someshit';
$pos = strpos(strToLower($string), strToLower($accessKey));
---cut---
or do the strpos() twice, i get the 0 and not the 1. and the array problem (strange
characters) is gone also.
fab
Previous Comments:
---------------------------------------------------------------------------
[2001-07-05 22:59:12] [EMAIL PROTECTED]
hi.
first of all, i'm not able to reproduce that. sorry. it only occures in the context of
my scripts.
occures in 4.0.5 also.
---cut---
$pos = strpos(strToLower($string), strToLower($accessKey));
echo $pos . " -" . $string . ' ' . $accessKey . "<br>n";
---cut---
this prints out '1 -Username U when it should be a 0 instead. when i do
---cut---
if ($string === 'Username') $string = 'Username';
---cut---
before, there's no problem. of course a var_dump() of $string shows string(8)
"Username".
in the same context,
---cut---
$t = array('<u>', '</u>');
echo $t[1];
---cut---
spits out a few strange characters (others each time)
instead of the '</u>'. and a var_dump() of $t even crashes
apache.
the value of $string ('Username') comes from mysql, it's a serialized value, and looks
like: ;s:8:"Username"; so this should be fine.
well, maybe this sounds familiar to you. to me it looks *very* strange. again, i'm not
able to reproduce it.
fab
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=11918
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]