From e19a7b2594e1ac26755315d83f7fbf6304784bb7 Mon Sep 17 00:00:00 2001 From: Shunsuke Takahashi Date: Wed, 21 Dec 2016 18:33:58 +0900 Subject: [PATCH] Check for options parameter is array --- lib/Cake/View/Helper/HtmlHelper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Cake/View/Helper/HtmlHelper.php b/lib/Cake/View/Helper/HtmlHelper.php index 62e77204b55..1382316518a 100644 --- a/lib/Cake/View/Helper/HtmlHelper.php +++ b/lib/Cake/View/Helper/HtmlHelper.php @@ -180,9 +180,9 @@ public function __construct(View $View, $settings = array()) { * @see HtmlHelper::link() for details on $options that can be used. * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/html.html#creating-breadcrumb-trails-with-htmlhelper */ - public function addCrumb($name, $link = null, $options = array()) { + public function addCrumb($name, $link = null, $options = null) { $prepend = false; - if (isset($options['prepend'])) { + if (is_array($options) && isset($options['prepend'])) { $prepend = $options['prepend']; unset($options['prepend']); }