|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-07-05 22:59 UTC] fabiankessler at usa dot net
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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 21:00:01 2025 UTC |
Could be serialization problem. Try to hard code the serialized value in your script, and compare that to your normal string. If you cannot reproduce it in any way, it'll be hard to find the problem. Try: $string = unserialize('s:8:"Username";'); $accessKey = 'U'; Just before the problematic piece in your script? Or whatever the actual value is of the serialized database-item?