php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2834 null return from strtok gives "Illegal offset type"
Submitted: 1999-11-26 15:32 UTC Modified: 2000-05-21 00:04 UTC
From: duncan at emarketeers dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Beta 3 OS: Linux 2.2.9 (Redhat 6.0)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: duncan at emarketeers dot com
New email:
PHP Version: OS:

 

 [1999-11-26 15:32 UTC] duncan at emarketeers dot com
The following code works in 3.0 (and I think worked in 4.0b2) but doesn't in 4.0b3:

$str=strtok("SOMETHING",".");
$a=array();
$a[$str]="First part";
$str=strtok(".");
$a[$str]="Second part";

The last assignment fails with 

Warning: Illegal offset type

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-05-21 00:04 UTC] andi at cvs dot php dot net
This should be fixed in the current CVS (RC2 and later). If it isn't please repost this bug report.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 10:01:30 2024 UTC