]> Kevux Git Server - koopa/commitdiff
Bugfix: operating on non-existent array index in p_s_split() of c_base_utf8
authorKevin Day <thekevinday@gmail.com>
Mon, 6 Mar 2017 00:50:15 +0000 (18:50 -0600)
committerKevin Day <thekevinday@gmail.com>
Mon, 6 Mar 2017 00:50:15 +0000 (18:50 -0600)
This causes PHP to crash as it does not like operating against non-existant indexes.

common/base/classes/base_utf8.php

index 16e630e522a8afa78b5f3b97d851704f970346fe..2b0cc5cc6d0527eb2d912c309caca02ed9753796 100644 (file)
@@ -1002,7 +1002,7 @@ class c_base_utf8 {
       unset($array);
     }
 
-    if ($split[0] === '') {
+    if (empty($split) || $split[0] === '') {
       return array();
     }