stringify_array_elms() could return weird results if the initial array key was not zero. this could trigger obscure bugs e.g. adding an empty string value to the recipients array in the notifier which could then select some broken hubloc/xchan entries.
This commit is contained in:
parent
a85f0a93c6
commit
3b73e5223e
@ -2456,8 +2456,8 @@ function magic_link($s) {
|
|||||||
* @param boolean $escape (optional) default false
|
* @param boolean $escape (optional) default false
|
||||||
*/
|
*/
|
||||||
function stringify_array_elms(&$arr, $escape = false) {
|
function stringify_array_elms(&$arr, $escape = false) {
|
||||||
for($x = 0; $x < count($arr); $x ++)
|
foreach($arr as $k => $v)
|
||||||
$arr[$x] = "'" . (($escape) ? dbesc($arr[$x]) : $arr[$x]) . "'";
|
$arr[$k] = "'" . (($escape) ? dbesc($v) : $v) . "'";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user