From a898f97d21c62af37defe8fe989d153331fea461 Mon Sep 17 00:00:00 2001 From: mufac Date: Tue, 1 Sep 2015 19:50:00 -0500 Subject: [PATCH] Set default when config option is empty The default config option is an empty array, which causes get() to return null, which can lead to an error with the type of the second argument to in_array(). --- system/src/Grav/Common/Grav.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/src/Grav/Common/Grav.php b/system/src/Grav/Common/Grav.php index e9aceffef..ba67052ff 100644 --- a/system/src/Grav/Common/Grav.php +++ b/system/src/Grav/Common/Grav.php @@ -455,7 +455,7 @@ class Grav extends Container if ($extension) { $download = true; - if (in_array(ltrim($extension, '.'), $this['config']->get('system.media.unsupported_inline_types'))) { + if (in_array(ltrim($extension, '.'), $this['config']->get('system.media.unsupported_inline_types', []))) { $download = false; } Utils::download($page->path() . DIRECTORY_SEPARATOR . $uri->basename(), $download);