From e52d1fe310e2ffc415d82ff307a58181669956f1 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Tue, 22 Oct 2013 14:17:41 -0700 Subject: [PATCH] Fix < PHP 5.4 compatibility break. Thanks GromNaN for submitting the patch. Signed-off-by: Edward Z. Yang --- library/HTMLPurifier/Strategy/MakeWellFormed.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/HTMLPurifier/Strategy/MakeWellFormed.php b/library/HTMLPurifier/Strategy/MakeWellFormed.php index f844d458..e389e001 100644 --- a/library/HTMLPurifier/Strategy/MakeWellFormed.php +++ b/library/HTMLPurifier/Strategy/MakeWellFormed.php @@ -582,7 +582,9 @@ class HTMLPurifier_Strategy_MakeWellFormed extends HTMLPurifier_Strategy { // NB not $this->zipper->insertBefore(), due to positioning // differences - return $this->zipper->splice($this->token, 0, array($token))[1]; + $splice = $this->zipper->splice($this->token, 0, array($token)); + + return $splice[1]; } /** -- 2.11.4.GIT