#34762 [Opn->Fbk]: isset returns true for chars past the end of string

From: Date: Thu, 06 Oct 2005 16:09:06 +0000
Subject: #34762 [Opn->Fbk]: isset returns true for chars past the end of string
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-86137@lists.php.net to get a copy of this message
 ID:               34762
 Updated by:       marcot@php.net
 Reported By:      dco at mail dot ru
-Status:           Open
+Status:           Feedback
 Bug Type:         Scripting Engine problem
 Operating System: Solaris 10
 PHP Version:      5.0.5
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip




Previous Comments:
------------------------------------------------------------------------

[2005-10-06 16:55:45] dco at mail dot ru

Description:
------------
I had a problem transferring my project to Solaris 10 from Windows. The
thing is that on Solaris 10 the characters past the end of strings are
considered set by the isset function.


Reproduce code:
---------------
$sa = 'sa';
if(isset($sa{2}))
  echo 'set';
else 
  echo 'not set';


Expected result:
----------------
I expect to see "not set".

Actual result:
--------------
I see "set" on Solaris 10,
"not set" on windows.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=34762&edit=1


Thread (2 messages)

« previous php.bugs (#86137) next »