commit 94448a099a3e8533e1a084c4056a5c7a7134c5cb parent c47bf701ea6db980d67c03df7b8aed576fcf88fd Author: Claudio Alessi <smoppy@gmail.com> Date: Wed, 26 Jun 2019 12:03:16 +0200 Handle empty view data. Diffstat:
M | bored.php | | | 5 | +++-- |
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/bored.php b/bored.php @@ -497,8 +497,9 @@ function viewinc($incname, $viewdata = []) { return NULL; /* only provide specified variable names */ - foreach($viewdata as $k => $v) - ${$k} = $v; + if($viewdata) + foreach($viewdata as $k => $v) + ${$k} = $v; unset($viewdata); unset($incname);