Skip to content

Commit

Permalink
#2280 - Fix char retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeckerson committed Oct 5, 2021
1 parent 85389d1 commit 093afda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Library/Optimizers/FunctionCall/GlobalsSetOptimizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ private function resolveInternalValue(array $definition, array $expression, stri
case 'char':
case 'uchar':
return strtr(
'(Z_TYPE_P(:v) == IS_STRING ? (Z_STRLEN_P(:v) ? zval_get_string(:v)[0] : NULL) : zval_get_long(:v))',
'(Z_TYPE_P(:v) == IS_STRING ? (Z_STRLEN_P(:v) ? Z_STRVAL_P(:v)[0] : NULL) : zval_get_long(:v))',
[':v' => $value]
);
case 'double':
Expand Down

0 comments on commit 093afda

Please sign in to comment.