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
 [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 06:01:32 2024 UTC