php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32530 Chunk_split changed behaviour in 4.3.11
Submitted: 2005-04-01 09:13 UTC Modified: 2005-04-03 20:10 UTC
Votes:5
Avg. Score:4.6 ± 0.8
Reproduced:5 of 5 (100.0%)
Same Version:5 (100.0%)
Same OS:5 (100.0%)
From: joc at presence-pc dot com Assigned: ilia (profile)
Status: Closed Package: Strings related
PHP Version: 4.3.11 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
40 - 19 = ?
Subscribe to this entry?

 
 [2005-04-01 09:13 UTC] joc at presence-pc dot com
Description:
------------
Hi,

I've just noticed a change in chunk_split behaviour in 4.3.11 which breaks my application.

Regards,
  Jocelyn

Reproduce code:
---------------
With the following script :

$test=chunk_split('test',10,"|end");
echo $test;

In 4.3.10 :

test|end

In 4.3.11 :

test

(ie "string end" in 4.3.10 is inserted at the end of the "string body" even if the word is smaller than the chunklen)

However if the word is greater than the chunklen 4.3.10 and 4.3.11 behaves the same.

Expected result:
----------------
test|end

Actual result:
--------------
test

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-01 12:23 UTC] joc at presence-pc dot com
.
 [2005-04-03 16:58 UTC] tony2001@php.net
Ilia, take a look at this, plz.
It was your patch that breaks it. 
 [2005-04-03 20:10 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 10:01:26 2024 UTC