Jaska Zedlik skrev:
<...>
The code of the override function is the following:
function stripForSearch( $string ) {
$s = $string;
$s = preg_replace( '/\xe2\x80\x99/', '\'', $s );
return parent::stripForSearch( $s );
}
I'm not a PHP programmer, but why using the extra assignment of $s
instead of using $string directly in the parent call, like so:
function stripForSearch( $string ) {
$s = preg_replace( '/\xe2\x80\x99/', '\'', $string );
return parent::stripForSearch( $s );
}
or even:
function stripForSearch( $string ) {
return parent::stripForSearch( preg_replace( '/\xe2\x80\x99/',
'\'', $string ) );
}
... ?
Regards,
// Rolf Lampa