Commit dde33d01 authored by Francesco Iannuzzelli's avatar Francesco Iannuzzelli

Fix site watch

parent 4080cefa
......@@ -552,8 +552,8 @@ class Scheduler
$html = $fm->Browse($watch['url']);
if($html!='') {
$keywords = array();
if (preg_match("@{$watch['keyword']}@i", $html, $keywords)) {
$counter = count($keywords);
if (preg_match_all("/{$watch['keyword']}/i", $html, $keywords) && isset($keywords[0]) && is_array($keywords[0])) {
$counter = count($keywords[0]);
$prev_counter = (int)$watch['counter'];
if($counter != $prev_counter) {
$subject = "Watch notification for {$watch['keyword']}";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment