From c39578ad1bca67f0a14b56bd4196795412d7f768 Mon Sep 17 00:00:00 2001 From: Carsten Rose <carsten.rose@math.uzh.ch> Date: Thu, 24 May 2018 17:28:37 +0200 Subject: [PATCH] Bug #5925 / Delete subrecord element: row remain visible delete.php: it seems that assign an array element to a string variable does not convert the string to an array. CR thought this was the case in the past (maybe a change in PHP7.2) --- extension/qfq/api/delete.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extension/qfq/api/delete.php b/extension/qfq/api/delete.php index 5b75fea99..d1bfcc37d 100644 --- a/extension/qfq/api/delete.php +++ b/extension/qfq/api/delete.php @@ -79,13 +79,14 @@ try { $answer = $qfq->delete(); // in case everything is fine, an empty string is returned. Else an Array. - $flagSuccess = ($answer == ''); + $flagSuccess = ($answer === ''); $targetUrl = Store::getVar(SIP_TARGET_URL, STORE_SIP); $modeAnswer = Store::getVar(SIP_MODE_ANSWER, STORE_SIP); switch ($modeAnswer) { case MODE_JSON: + $answer = array(); if ($flagSuccess) { $answer[API_MESSAGE] = 'Deleted'; $answer[API_REDIRECT] = API_ANSWER_REDIRECT_CLIENT; -- GitLab