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
path: root/tests
diff options
context:
space:
mode:
authorBenaka Moorthi <benaka.moorthi@gmail.com>2013-05-15 01:42:48 +0400
committerBenaka Moorthi <benaka.moorthi@gmail.com>2013-05-15 01:42:48 +0400
commit3da4732f130e3ed4a44e89dc440e99e981020628 (patch)
treec1ee6c6e382fcdd6b3e3bf4d472e801dbf30dc5c /tests
parent61373ec33fac7cb60f7c7eb3d0751068404a74a3 (diff)
Got VisualPHPUnit to work with PHP 5.4.
Diffstat (limited to 'tests')
-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--;