Index: typo3/mod/tools/em/class.em_index.php =================================================================== --- typo3/mod/tools/em/class.em_index.php (revision 4809) +++ typo3/mod/tools/em/class.em_index.php (working copy) @@ -3570,7 +3570,7 @@ } } // - $XclassParts = split('if \(defined\([\'"]TYPO3_MODE[\'"]\) && \$TYPO3_CONF_VARS\[TYPO3_MODE\]\[[\'"]XCLASS[\'"]\]',$fContent,2); + $XclassParts = preg_split('/if \(defined\([\'"]TYPO3_MODE[\'"]\) && \$TYPO3_CONF_VARS\[TYPO3_MODE\]\[[\'"]XCLASS[\'"]\]/',$fContent,2); if (count($XclassParts)==2) { unset($reg); preg_match('/^\[[\'"]([[:alnum:]_\/\.]*)[\'"]\]/',$XclassParts[1],$reg); Index: typo3/mod/tools/em/class.nusoap.php =================================================================== --- typo3/mod/tools/em/class.nusoap.php (revision 4809) +++ typo3/mod/tools/em/class.nusoap.php (working copy) @@ -2907,7 +2907,7 @@ */ function parseCookie($cookie_str) { $cookie_str = str_replace('; ', ';', $cookie_str) . ';'; - $data = split(';', $cookie_str); + $data = explode(';', $cookie_str); $value_str = $data[0]; $cookie_param = 'domain='; Index: typo3/sysext/cms/tslib/class.tslib_content.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_content.php (revision 4809) +++ typo3/sysext/cms/tslib/class.tslib_content.php (working copy) @@ -3129,10 +3129,10 @@ while(list($tK,$tV)=each($aKeys)) { $aKeys[$tK]=quotemeta($tV); } - $regex = implode('|',$aKeys); + $regex = '/'.implode('|',$aKeys).'/'; // Doing regex's - $storeArr['c'] = split($regex,$content); - preg_match_all('/'.$regex.'/',$content,$keyList); + $storeArr['c'] = preg_split($regex,$content); + preg_match_all($regex,$content,$keyList); $storeArr['k']=$keyList[0]; // Setting cache: $this->substMarkerCache[$storeKey] = $storeArr; @@ -4436,7 +4436,7 @@ if ($GLOBALS['TSFE']->no_cache && $conf['sword'] && is_array($GLOBALS['TSFE']->sWordList) && $GLOBALS['TSFE']->sWordRegEx) { $newstring = ''; do { - $pieces = split($GLOBALS['TSFE']->sWordRegEx,$data,2); + $pieces = preg_split('/'.$GLOBALS['TSFE']->sWordRegEx.'/',$data,2); $newstring.=$pieces[0]; $match_len = strlen($data)-(strlen($pieces[0])+strlen($pieces[1])); if (strstr($pieces[0],'<') || strstr($pieces[0],'>')) { @@ -6054,7 +6054,7 @@ * @return string Cleaned up string, keywords will be separated by a comma only. */ function keywords($content) { - $listArr = split(',|;|'.chr(10),$content); + $listArr = preg_split('/[,;'.chr(10).']/',$content); reset($listArr); while(list($k,$v)=each($listArr)) { $listArr[$k]=trim($v); @@ -6177,7 +6177,7 @@ $emailContent = trim($msg); if ($emailContent) { - $parts = split(chr(10),$emailContent,2); // First line is subject + $parts = explode(chr(10),$emailContent,2); // First line is subject $subject=trim($parts[0]); $plain_message=trim($parts[1]); @@ -6965,7 +6965,7 @@ $where = ''; if ($sw) { $searchFields = explode(',',$searchFieldList); - $kw = split('[ ,]',$sw); + $kw = preg_split('/[ ,]/',$sw); while(list(,$val)=each($kw)) { $val = trim($val); Index: typo3/sysext/cms/tslib/class.tslib_fe.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_fe.php (revision 4809) +++ typo3/sysext/cms/tslib/class.tslib_fe.php (working copy) @@ -1547,7 +1547,7 @@ $res = t3lib_div::getURL($code, 1, $headerArr); // Header and content are separated by an empty line - list($header,$content) = split("\r\n\r\n", $res, 2); + list($header,$content) = preg_split("/[\r\n\r\n]/", $res, 2); $content.= "\r\n"; if (false === $res) { Index: typo3/sysext/cms/layout/class.tx_cms_layout.php =================================================================== --- typo3/sysext/cms/layout/class.tx_cms_layout.php (revision 4809) +++ typo3/sysext/cms/layout/class.tx_cms_layout.php (working copy) @@ -2270,7 +2270,7 @@ * @return string Processed output. */ function wordWrapper($content,$max=50,$char=' -') { - $array = split(' |'.chr(10),$content); + $array = preg_split('/[ '.chr(10).']/',$content); foreach($array as $val) { if (strlen($val)>$max) { $content=str_replace($val,substr(chunk_split($val,$max,$char),0,-1),$content); Index: typo3/sysext/install/mod/class.tx_install.php =================================================================== --- typo3/sysext/install/mod/class.tx_install.php (revision 4809) +++ typo3/sysext/install/mod/class.tx_install.php (working copy) @@ -4512,7 +4512,7 @@ * @return [type] ... */ function suggestTCAFieldDefinition($fieldName,$fieldInfo) { - list($type,$len) = split(' |\(|\)',$fieldInfo,3); + list($type,$len) = preg_split('/ |\(|\)/',$fieldInfo,3); switch($type) { case 'int': $out=" Index: typo3/view_help.php =================================================================== --- typo3/view_help.php (revision 4809) +++ typo3/view_help.php (working copy) @@ -534,7 +534,7 @@ global $TCA,$BE_USER,$TCA_DESCR; // Split references by comma, vert.line or linebreak - $items = split(',|'.chr(10),$value); + $items = preg_split('/[,|'.chr(10).']/',$value); $lines = array(); foreach($items as $val) { Index: t3lib/class.t3lib_div.php =================================================================== --- t3lib/class.t3lib_div.php (revision 4809) +++ t3lib/class.t3lib_div.php (working copy) @@ -1725,7 +1725,7 @@ } // create_function() returns a string: if (!is_string($getValueFunc)) { - $getValueFunc = null; + $getValueFunc = null; } // Do the filtering: if (is_array($keepItems) && count($keepItems)) { @@ -2052,7 +2052,7 @@ $tag_tmp = trim(substr($tag_tmp,1)); // Removes = chars. } else { // There are '' around the value. We look for the next ' ' or '>' - $reg = split('[[:space:]=]',$tag_tmp,2); + $reg = preg_split('/[[:space:]=]/',$tag_tmp,2); $value[] = trim($reg[0]); $tag_tmp = trim(substr($tag_tmp,strlen($reg[0]),1).$reg[1]); } Index: t3lib/class.t3lib_matchcondition.php =================================================================== --- t3lib/class.t3lib_matchcondition.php (revision 4809) +++ t3lib/class.t3lib_matchcondition.php (working copy) @@ -237,7 +237,7 @@ $test = trim($test); if (strlen($test)) { if (preg_match('/^\*.+\*$/',$test)) { - $allLanguages = split('[,;]',t3lib_div::getIndpEnv('HTTP_ACCEPT_LANGUAGE')); + $allLanguages = preg_split('/[,;]/',t3lib_div::getIndpEnv('HTTP_ACCEPT_LANGUAGE')); if (in_array(substr($test,1,-1), $allLanguages)) {return true;} } else { if (t3lib_div::getIndpEnv('HTTP_ACCEPT_LANGUAGE') == $test) {return true;} @@ -359,7 +359,7 @@ { return t3lib_div::compat_version($value); } break; case 'userFunc': - $values = split('\(|\)',$value); + $values = preg_split('/[\(\)]/',$value); $funcName=trim($values[0]); $funcValue = t3lib_div::trimExplode(',',$values[1]); $pre = $GLOBALS['TSFE']->TYPO3_CONF_VARS['FE']['userFuncClassPrefix']; Index: t3lib/class.t3lib_cs.php =================================================================== --- t3lib/class.t3lib_cs.php (revision 4809) +++ t3lib/class.t3lib_cs.php (working copy) @@ -990,7 +990,7 @@ if (!$detectedType) $detectedType = ereg('[[:space:]]*0x([[:alnum:]]*)[[:space:]]+0x([[:alnum:]]*)[[:space:]]+',$value) ? 'whitespaced' : 'ms-token'; if ($detectedType=='ms-token') { - list($hexbyte,$utf8) = split('=|:',$value,3); + list($hexbyte,$utf8) = preg_split('/[=:]/',$value,3); } elseif ($detectedType=='whitespaced') { $regA=array(); ereg('[[:space:]]*0x([[:alnum:]]*)[[:space:]]+0x([[:alnum:]]*)[[:space:]]+',$value,$regA); @@ -1074,7 +1074,7 @@ while (!feof($fh)) { $line = fgets($fh,4096); // has a lot of info - list($char,$name,$cat,,,$decomp,,,$num,,,,$upper,$lower,$title,) = split(';', rtrim($line)); + list($char,$name,$cat,,,$decomp,,,$num,,,,$upper,$lower,$title,) = explode(';', rtrim($line)); $ord = hexdec($char); if ($ord > 0xFFFF) break; // only process the BMP @@ -1128,7 +1128,7 @@ case '': continue 2; } - $decomposition["U+$char"] = split(' ',$match[2]); + $decomposition["U+$char"] = explode(' ',$match[2]); } } fclose($fh); @@ -1146,17 +1146,17 @@ if ($cond == '' || $cond{0} == '#') { $utf8_char = $this->UnumberToChar(hexdec($char)); if ($char != $lower) { - $arr = split(' ',$lower); + $arr = explode(' ',$lower); for ($i=0; isset($arr[$i]); $i++) $arr[$i] = $this->UnumberToChar(hexdec($arr[$i])); $utf8CaseFolding['toLower'][$utf8_char] = implode('',$arr); } if ($char != $title && $title != $upper) { - $arr = split(' ',$title); + $arr = explode(' ',$title); for ($i=0; isset($arr[$i]); $i++) $arr[$i] = $this->UnumberToChar(hexdec($arr[$i])); $utf8CaseFolding['toTitle'][$utf8_char] = implode('',$arr); } if ($char != $upper) { - $arr = split(' ',$upper); + $arr = explode(' ',$upper); for ($i=0; isset($arr[$i]); $i++) $arr[$i] = $this->UnumberToChar(hexdec($arr[$i])); $utf8CaseFolding['toUpper'][$utf8_char] = implode('',$arr); } @@ -1177,7 +1177,7 @@ if ($line{0} != '#' && trim($line) != '') { list($char,$translit) = t3lib_div::trimExplode(';', $line); if (!$translit) $omit["U+$char"] = 1; - $decomposition["U+$char"] = split(' ', $translit); + $decomposition["U+$char"] = explode(' ', $translit); } } Index: t3lib/class.t3lib_htmlmail.php =================================================================== --- t3lib/class.t3lib_htmlmail.php (revision 4809) +++ t3lib/class.t3lib_htmlmail.php (working copy) @@ -923,7 +923,7 @@ $attribRegex = $this->tag_regex(array('img','table','td','tr','body','iframe','script','input','embed')); // split the document by the beginning of the above tags - $codepieces = split($attribRegex, $html_code); + $codepieces = preg_split($attribRegex, $html_code); $len = strlen($codepieces[0]); $pieces = count($codepieces); $reg = array(); @@ -954,7 +954,7 @@ // Extracting stylesheets $attribRegex = $this->tag_regex(array('link')); // Split the document by the beginning of the above tags - $codepieces = split($attribRegex, $html_code); + $codepieces = preg_split($attribRegex, $html_code); $pieces = count($codepieces); for ($i = 1; $i < $pieces; $i++) { $dummy = eregi("[^>]*", $codepieces[$i], $reg); @@ -977,7 +977,7 @@ } // fixes javascript rollovers - $codepieces = split(quotemeta(".src"), $html_code); + $codepieces = preg_split('/'.quotemeta(".src").'/', $html_code); $pieces = count($codepieces); $expr = "^[^".quotemeta("\"").quotemeta("'")."]*"; for($i = 1; $i < $pieces; $i++) { @@ -1013,7 +1013,7 @@ public function extractHyperLinks() { $html_code = $this->theParts['html']['content']; $attribRegex = $this->tag_regex(array('a','form','area')); - $codepieces = split($attribRegex, $html_code); // Splits the document by the beginning of the above tags + $codepieces = preg_split($attribRegex, $html_code); // Splits the document by the beginning of the above tags $len = strlen($codepieces[0]); $pieces = count($codepieces); for($i = 1; $i < $pieces; $i++) { @@ -1069,7 +1069,7 @@ if (strpos(' '.$htmlCode,'tag_regex('frame'); // Splits the document by the beginning of the above tags - $codepieces = split($attribRegex, $htmlCode, 1000000); + $codepieces = preg_split($attribRegex, $htmlCode, 1000000); $pieces = count($codepieces); for($i = 1; $i < $pieces; $i++) { $dummy = eregi("[^>]*", $codepieces[$i], $reg); @@ -1418,13 +1418,13 @@ */ public function tag_regex($tags) { $tags = (!is_array($tags) ? array($tags) : $tags); - $regexp = ''; + $regexp = '/'; $c = count($tags); foreach($tags as $tag) { $c--; $regexp .= '<' . sql_regcase($tag) . "[[:space:]]" . (($c) ? '|' : ''); } - return $regexp; + return $regexp . '/'; } @@ -1444,7 +1444,7 @@ // Find attribute while ($tag) { $value = ''; - $reg = split("[[:space:]=>]",$tag,2); + $reg = preg_split('/[[:space:]=>]/',$tag,2); $attrib = $reg[0]; $tag = ltrim(substr($tag,strlen($attrib),$tagLen)); Index: t3lib/class.t3lib_tceforms.php =================================================================== --- t3lib/class.t3lib_tceforms.php (revision 4809) +++ t3lib/class.t3lib_tceforms.php (working copy) @@ -720,7 +720,7 @@ $editFieldList=array_unique(t3lib_div::trimExplode(',',$list,1)); foreach($editFieldList as $theFieldC) { - list($theField,$palFields) = split('\[|\]',$theFieldC); + list($theField,$palFields) = preg_split('/\[|\]/',$theFieldC); $theField = trim($theField); $palFields = trim($palFields); if ($TCA[$table]['columns'][$theField]) { @@ -2612,7 +2612,7 @@ // Kasper's comment (kept for history): Maybe there is a better way to do this than store the HTML for the new element in rawurlencoded format - maybe it even breaks with certain charsets? But for now this works... $this->additionalJS_post = $additionalJS_post_saved; $this->additionalJS_submit = $additionalJS_submit_saved; - $new = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.new', 1); + $new = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.new', 1); $newElementsLinks[]= ' backPath,'gfx/new_el.gif','width="11" height="12"').' alt="' . $new . '" title="' . $new . '" align="absmiddle" />' . htmlspecialchars(t3lib_div::fixed_lgd_cs($this->sL($nCfg['tx_templavoila']['title']),30)) . ''; @@ -2626,7 +2626,7 @@ $output.= '
- backPath,'gfx/pil2right.gif','width="7" height="12"').' align="absmiddle" alt="' . + backPath,'gfx/pil2right.gif','width="7" height="12"').' align="absmiddle" alt="' . $toggleAll . '" title="' . $toggleAll . '" /> backPath,'gfx/pil2right.gif','width="7" height="12"').' align="absmiddle" alt="' . $toggleAll . '" title="' . $toggleAll . '" />' . $toggleAll . '