View Issue Details

IDProjectCategoryView StatusLast Update
0010973mantisbtbugtrackerpublic2009-10-14 09:24
Reporterdhx Assigned Todhx  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.0rc2 
Target Version1.2.0rc2Fixed in Version1.2.0rc2 
Summary0010973: split() is deprecated in PHP 5.3.0, use preg_split() instead
Description

See http://au2.php.net/manual/en/function.split.php for the deprecation notice.

Matches with grep -Rn [^_.]split( *

adm_config_set.php:90: $t_split = split( '=>', $value, 2 );
admin/check.php:173: $t_version = split("Zend Optimizer",$t_output);
admin/check.php:174: $t_version = split(",",$t_version[1]);
library/nusoap/class.soap_transport_http.php:1202: $data = split(';', $cookie_str);
library/nusoap/nusoap.php:3309: $data = split(';', $cookie_str);
library/adodb/adodb-datadict.inc.php:522: list(,$column_def) = split("[\t ]+",$first,2);
library/adodb/drivers/adodb-postgres64.inc.php:664: $host = split(":", $str);
library/adodb/drivers/adodb-informix72.inc.php:372: $arr = split(';',$v); //"SQLTYPE;length;precision;scale;ISNULLABLE"
library/adodb/drivers/adodb-ldap.inc.php:64: $conn_info = split( ':', $host );

TagsNo tags attached.

Relationships

related to 0010976 closeddregad Remove instances of pass-by-reference (deprecated in PHP 5.3.0) 
related to 0010975 closeddhx eregi_replace() is deprecated in PHP 5.3.0, use preg_replace() with the 'i' modifier instead 
related to 0010974 closedjreese ereg() is deprecated in PHP 5.3.0, use preg_match() instead 

Activities

jreese

jreese

2009-09-22 15:55

reporter   ~0023019

I would imagine that it would eb far more prudent to replace split() calls with explode(), considering that (afaik) we never use a full regex in the split call, and explode() is essentially identical when not using a regex.

dhx

dhx

2009-09-22 18:43

reporter   ~0023021

Yep that is a good point, I was just copying the recommended replacement from the PHP site :)

Related Changesets

MantisBT: master-1.2.x c22bd5d8

2009-10-05 03:20

dhx


Details Diff
Fix 0010973: split() is deprecated

split() is deprecated in PHP 5.3.0 and should either be replaced with
explode() or preg_split().
Affected Issues
0010973
mod - adm_config_set.php Diff File
mod - admin/check.php Diff File

MantisBT: master 2fe93425

2009-10-05 03:20

dhx


Details Diff
Fix 0010973: split() is deprecated

split() is deprecated in PHP 5.3.0 and should either be replaced with
explode() or preg_split().
Affected Issues
0010973
mod - adm_config_set.php Diff File
mod - admin/check.php Diff File