From 2d26dbae38a64d9a5211bfd20168ba98da2833a1 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Tue, 6 Feb 2018 15:21:57 +0300 Subject: [PATCH] =?UTF-8?q?Error:=20Call=20to=20a=20member=20function=20ne?= =?UTF-8?q?xt()=20on=20array=20(=D0=B2=20optionsDB)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Form/OptionFactory.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Form/OptionFactory.php b/src/Form/OptionFactory.php index 267eff1..739dbdb 100644 --- a/src/Form/OptionFactory.php +++ b/src/Form/OptionFactory.php @@ -32,10 +32,10 @@ class Form_OptionFactory { list($key, $value) = explode(",", $keyvalue); try { $query_result = $this->db->executeQuery("SELECT * FROM $table"); + $field->options = $this->optionsDB($key, $value, $query_result); } catch(Exception $ex) { - $query_result = []; + $field->options = []; } - $field->options = $this->optionsDB($key, $value, $query_result); } elseif (isset($input['options.pair'])) { $field->options = $this->optionsPair($input['options.pair']); } elseif (isset($input['options.model'])) {