Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0a1

Bug #16446 Use of split() causes E_DEPRECATED warnings
Submitted: 2009-07-17 09:26 UTC Modified: 2009-08-08 06:02 UTC
From: aharvey Assigned: ashnazg
Status: Closed Package: PhpDocumentor (version 1.4.2)
PHP Version: 5.3.0 OS: Irrelevant
Roadmaps: 1.4.3    
Subscription  



Patch phpdocumentor-split-replacements Revisions
Revision 2009-07-17 09:26 UTC
Developer aharvey
 
Download patch

Index: phpDocumentor/InlineTags.inc
===================================================================
--- phpDocumentor/InlineTags.inc	(revision 284238)
+++ phpDocumentor/InlineTags.inc	(working copy)
@@ -304,7 +304,7 @@
         $descrip = false;
         if (strpos($this->value, ',') === false) {
             if (strpos(trim($this->value), ' ')) {
-                $v     = split(' ', trim($this->value));
+                $v     = explode(' ', trim($this->value));
                 $value = $c->getTutorialLink($v[0]);
                 array_shift($v);
                 $descrip = join($v, ' ');
@@ -312,12 +312,12 @@
                 $value = $c->getTutorialLink($this->value);
             }
         } else {
-            $vals    = split(',', $this->value);
+            $vals    = explode(',', $this->value);
             $descrip = array();
             foreach ($vals as $val) {
                 $val = trim($val);
                 if (strpos($val, ' ')) {
-                    $v       = split(' ', $val);
+                    $v       = explode(' ', $val);
                     $value[] = $c->getTutorialLink($v[0]);
                     array_shift($v);
                     $descrip[] = join($v, ' ');
Index: phpDocumentor/Io.inc
===================================================================
--- phpDocumentor/Io.inc	(revision 284238)
+++ phpDocumentor/Io.inc	(working copy)
@@ -453,8 +453,8 @@
             {
                 if (dirname($path) != $masterPath)
                 {
-                    $mp = split(PATH_DELIMITER,$masterPath);
-                    $np = split(PATH_DELIMITER,str_replace('\\','/',dirname($path)));
+                    $mp = explode(PATH_DELIMITER, $masterPath);
+                    $np = explode(PATH_DELIMITER, str_replace('\\', '/', dirname($path)));
                     if (count($np) < count($mp))
                     {
                         $masterPath = join($np, PATH_DELIMITER);
Index: phpDocumentor/phpDocumentorTParser.inc
===================================================================
--- phpDocumentor/phpDocumentorTParser.inc	(revision 284238)
+++ phpDocumentor/phpDocumentorTParser.inc	(working copy)
@@ -1882,7 +1882,7 @@
                 }
             } else {
                 $save      = $value[$i];
-                $value[$i] = split("[\t ]", str_replace("\t", '    ', $value[$i]));
+                $value[$i] = preg_split("/[\t ]/", str_replace("\t", '    ', $value[$i]));
                 $word      = trim(array_shift($value[$i]));
                 $val       = join(' ', $value[$i]);
                 if (trim($word) == 'internal') {