Commit 19f69203 authored by M. Dent's avatar M. Dent

Merge branch 'deliverynotice_fixes' into 'dev'

do not save empty postopts

See merge request !223
parents cd6cf4ec 3cda8bf2
......@@ -108,8 +108,12 @@ logger ("Get postid & opts: ".print_r($r,true));
}
}
$postopts = explode(',',$r[0]['postopts']);
$postopts[] = $postopt;
if($r[0]['postopts'])
$postopts = explode(',',$r[0]['postopts']);
else
$postopts = [];
$postopts[] = $postopt;
if ($postopt == 'delivery_success') {
// Everything delivered, clear all the flags
......@@ -124,6 +128,7 @@ logger ("Get postid & opts: ".print_r($r,true));
}
$postopts = implode(',',array_unique($postopts));
$r= q("update item set postopts = '%s' where id = %d",dbesc($postopts),$iid);
}
......
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