Bug #22178
closedDeprecated function sql_regcase in cms/tslib/class.tslib_pagegen.php
0%
Description
The function pagegenInit() in typo3/sysext/cms/tslib/class.tslib_pagegen.php is using the function sql_regcase() which is deprecated in PHP 5.3.
The default front-end search form is using this function. At least if a link in the result set is clicked.
Possible solution:
Add an additional function to replace sql_regcase:
function mb_sql_regcase($string,$encoding='auto'){
$max=mb_strlen($item,$encoding);
for ($i = 0; $i < $max; $i++) {
$char=mb_substr($item,$i,1,$encoding);
$up=mb_strtoupper ($char,$encoding);
$low=mb_strtolower($char,$encoding);
$ret.=($up!=$low)?'['.$up.$low.']' : $char;
}
return $ret;
}
?>
(issue imported from #M13649)
Files
Updated by Philipp Gampe over 14 years ago
I can confirm this problem ...
sr_feuser_register uses this two
Updated by Martin over 14 years ago
Hey,
the occurrence of depricated funktion is only on t3lib/class.t3lib_htmlmail.php and typo3/sysext/cms/tslib/class.tslib_pagegen.php
On file class.tslib_pagegen.php it is used for front-end search form only.
The intent is to produce a Regex with case insensitiv characters.
My proposal is to cut off additional functions for that case.
The patch #10231 / Revision 5574 replaced split() to preg_split() on class.tslib_content.php. Now we can use the regex-modifier on regex-pattern to achieve that.
My patch cut off sql_regcase() without adding an additional function.
Updated by Andreas over 14 years ago
what's with that patch? in SVN there is still no sight of that suggested change - so in php 5.3.x this typo3 classes still dont do there work. all the best!
Updated by Chris topher over 14 years ago
Hi Andreas,
you can post a reminder to the thread in Core List. People most likely won't see it here...
Updated by Andreas Lappe over 14 years ago
patch_2 works without offset against 4.4.0...
Updated by Steffen Kamper over 14 years ago
Committed to svn
4_3 rev 8293
4_4 rev 8294
trunk rev 8295