From ad5c2d41b48486ed9203973a77c55968daef48f9 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Thu, 27 Sep 2018 11:51:43 +0200 Subject: [PATCH] PHP 5.3 compatibility in array syntax and use strict comparison operators --- code/search/SearchForm.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/search/SearchForm.php b/code/search/SearchForm.php index 763d3e23..01b648ee 100644 --- a/code/search/SearchForm.php +++ b/code/search/SearchForm.php @@ -180,14 +180,14 @@ class SearchForm extends Form { } // Add * to each keyword $splitWords = preg_split("/ +/", trim($keywords)); - $newWords = []; + $newWords = array(); for ($i = 0; $i < count($splitWords); $i++) { $word = $splitWords[$i]; - if ($word[0] == '"') { + if ($word[0] === '"') { while (++$i < count($splitWords)) { $subword = $splitWords[$i]; $word .= ' ' . $subword; - if (substr($subword, -1) == '"') { + if (substr($subword, -1) === '"') { break; } }