From: Agnibho Mondal Date: Thu, 10 Jun 2021 21:23:10 +0000 (+0530) Subject: Bugfix X-Git-Url: https://code.agnibho.com/repo?a=commitdiff_plain;h=9bf3d45df9aababa736edce4f60849a3e9ec9f9f;p=simpleipd.git Bugfix --- diff --git a/www/treatment.php b/www/treatment.php index a5426ba..20b6489 100644 --- a/www/treatment.php +++ b/www/treatment.php @@ -25,7 +25,10 @@ if(!empty($_GET["pid"])){ elseif(!empty($_POST["drug"])){ $db->addDrug($pid, $_POST["drug"], $_POST["dose"], $_POST["route"], $_POST["frequency"], $_POST["date"], $_POST["time"], $_POST["duration"], $_POST["extra_note"]); } - $advice=$db->getAdvice($pid)->fetchArray()["data"]; + $advice=$db->getAdvice($pid)->fetchArray(); + if(!empty($advice["data"])){ + $advice=$advice["data"]; + } $list=$db->getDrugs($pid); $view=""; while($drug=$list->fetchArray()){