codeigniter - Strange error with PHP str_replace &$count argument -
in codeigniter controller have statement:
$txt = str_replace($t, $bracketted_var, $txt, &$count);
$count variable passed reference , i'm using it's changed value later in program.
discovered on new installation php/5.3.3-7 calling controller gives me in firefox response:
the connection server reset while page loading
without log entry in apache access log. in error log noticed 2 entries: [mon aug 26 12:12:28 2013] [notice] child pid 32048 exit signal segmentation fault (11) [mon aug 26 12:12:28 2013] [notice] child pid 32082 exit signal segmentation fault (11)
i tried couple of other browsers , androind , iphone without getting web page content.
the statement wasn't in function called. looks kind of syntax error arise during parsing php file.
searching solution discovered str_replace statement doesn't give error:
$txt = str_replace($t, $bracketted_var, $txt, $count);
i did temporarily make change other parts of controller working. need use changed $count variable number of changes. suggestions?
searching didn't find usefull such error.
call time pass refernence deprecated (in php > v5.3, it's utterly removed in v5.4 @ point it'll raise fatal error). can leave have now, $count
should updatet denoted reference str_replace
itself.
see http://php.net/manual/en/function.str-replace.php , http://php.net/manual/en/language.references.pass.php
Comments
Post a Comment