the code:
The problem is widget.php line 861.
$numMatches = preg_match_all( '/\(\#\(inherent\:(.*)\)\#\)/', $widget, $matches);
must be replaced by:
$numMatches = preg_match_all( '/\(\#\(inherent\:(.*)\)\#\)/Us', $widget, $matches);
the explanation.
the original regular expression catch two inherit as one only because the bigger match the expression too. You must change greedy of regular expression /U, ( and add multiline /s for more robust code).
example:
$widget='(#(inherit:66|select count(id) from apps_photo_archive
where "((username))" = published_by)#)(#(inherit:82|select * from apps_photo_archive where "((username))" =published_by)#)';
echo preg_match_all( '/\(\#\(inherit\:(.*)\)\#\)/sU', $widget,$matches); // return 2
echo preg_match_all( '/\(\#\(inherit\:(.*)\)\#\)/s', $widget,$matches); // return 1
echo preg_match_all( '/\(\#\(inherit\:(.*)\)\#\)/', $widget,$matches); //return 0 (the is a new line character..)
the code: (inherent\ :(.*)\) \#\)/', $widget, $matches);
The problem is widget.php line 861.
$numMatches = preg_match_all( '/\(\#\
must be replaced by: (inherent\ :(.*)\) \#\)/Us' , $widget, $matches);
$numMatches = preg_match_all( '/\(\#\
the explanation.
the original regular expression catch two inherit as one only because the bigger match the expression too. You must change greedy of regular expression /U, ( and add multiline /s for more robust code).
example: '(#(inherit: 66|select count(id) from apps_photo_archive by)#)(# (inherit: 82|select * from apps_photo_archive where "((username))" =published_by)#)';
$widget=
where "((username))" = published_
echo preg_match_all( '/\(\#\ (inherit\ :(.*)\) \#\)/sU' , $widget,$matches); // return 2 (inherit\ :(.*)\) \#\)/s' , $widget,$matches); // return 1 (inherit\ :(.*)\) \#\)/', $widget,$matches); //return 0 (the is a new line character..)
echo preg_match_all( '/\(\#\
echo preg_match_all( '/\(\#\