php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52656 DOMCdataSection::splitText broken
Submitted: 2010-08-20 15:24 UTC Modified: 2010-11-29 15:49 UTC
From: daniel_schulz1 at web dot de Assigned: iliaa (profile)
Status: Closed Package: DOM XML related
PHP Version: 5.3.3 OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: daniel_schulz1 at web dot de
New email:
PHP Version: OS:

 

 [2010-08-20 15:24 UTC] daniel_schulz1 at web dot de
Description:
------------
The class "DOMCdataSection" inherits the function "splitText" from DOMText.
However, this function apparently always return bool(false), a return type not even mentioned in the DOMText::splitText documentation.

Test script:
---------------
$CData = new DOMCdataSection('splithere!');
$CDataSplit = $CData->splitText(5);
var_dump($CData->data);			//string(10) "splithere!"
var_dump($CDataSplit->data);	//NULL

var_dump($CDataSplit);			//bool(false)

Expected result:
----------------
The function $CData->splitText() should have returned a "DOMCdataSection" object with its "data" property containing "here!".
The object $CData should have its "data" property shortened to "split".

Actual result:
--------------
The function $CData->splitText() returns boolean "false", and does not modify its object's "data" property.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-11-29 15:48 UTC] iliaa@php.net
Automatic comment from SVN on behalf of iliaa
Revision: http://svn.php.net/viewvc/?view=revision&revision=305837
Log: Fixed bug #52656 (DOMCdataSection does not work with splitText).
 [2010-11-29 15:49 UTC] iliaa@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: iliaa
 [2010-11-29 15:49 UTC] iliaa@php.net
This bug has been fixed in SVN.

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 Nov 21 12:01:29 2024 UTC