Avoid using trim() on null

This commit is contained in:
Alain Schlesser
2021-12-09 15:25:30 -05:00
parent 3a65e8adf3
commit d5499fc8fc
+2 -2
View File
@@ -88,11 +88,11 @@ class Mustache_Tokenizer
* @throws Mustache_Exception_InvalidArgumentException when $delimiters string is invalid * @throws Mustache_Exception_InvalidArgumentException when $delimiters string is invalid
* *
* @param string $text Mustache template source to tokenize * @param string $text Mustache template source to tokenize
* @param string $delimiters Optionally, pass initial opening and closing delimiters (default: null) * @param string $delimiters Optionally, pass initial opening and closing delimiters (default: empty string)
* *
* @return array Set of Mustache tokens * @return array Set of Mustache tokens
*/ */
public function scan($text, $delimiters = null) public function scan($text, $delimiters = '')
{ {
// Setting mbstring.func_overload makes things *really* slow. // Setting mbstring.func_overload makes things *really* slow.
// Let's do everyone a favor and scan this string as ASCII instead. // Let's do everyone a favor and scan this string as ASCII instead.