Skip to content

Commit 05e2544

Browse files
committed
Fix plus helper
1 parent a47fecb commit 05e2544

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

examples/calcul.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
a = 4;
2+
b = 1;
3+
c = 3;
4+
5+
return b + a * c;

examples/calcul.return

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
13

src/JsPhpize/Parser/Helpers/Plus.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function ($base) {
22
foreach (array_slice(func_get_args(), 1) as $value) {
3-
$base = is_string($value) || is_string($value) ? $base . $value : $base + $value;
3+
$base = is_string($base) || is_string($value) ? $base . $value : $base + $value;
44
}
55

66
return $base;

0 commit comments

Comments
 (0)