Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/lib/visualphpunit/app/lib/VPU.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/lib/visualphpunit/app/lib/VPU.php b/tests/lib/visualphpunit/app/lib/VPU.php
index af1f5cc0b6..5eef4d4b82 100755
--- a/tests/lib/visualphpunit/app/lib/VPU.php
+++ b/tests/lib/visualphpunit/app/lib/VPU.php
@@ -157,8 +157,11 @@ class VPU {
++$i;
}
} elseif ( $char == '{' ) {
+ $j = $i + 1;
+ while ($str{$j} === ' ' || $str{$j} === "\n" || $str{$j} === "\t") ++$j;
+
// Ensure we're only adding events to the array
- if ( $nest == 0 && substr($str, $i, 8) != '{"event"' ) {
+ if ( $nest == 0 && substr($str, $j, 7) != '"event"' ) {
continue;
}
@@ -168,9 +171,9 @@ class VPU {
}
} elseif ( $char == '}' && $nest > 0 ) {
if ( $nest == 1 ) {
- $tags[] = substr(
+ $tags[] = trim(substr(
$str, $start_mark + 1, $i - $start_mark - 1
- );
+ ));
$start_mark = $i;
}
$nest--;