Skip to content

Commit

Permalink
Merge pull request phalcon#39 from Cinderella-Man/fwrite-optimizer-TS…
Browse files Browse the repository at this point in the history
…RMLS_CC-fix

fwrite fix
  • Loading branch information
Phalcon committed Dec 2, 2013
2 parents f2c68b5 + 5043da4 commit 4801061
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Library/Optimizers/FunctionCall/FwriteOptimizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ public function optimize(array $expression, Call $call, CompilationContext $cont

$resolvedParams = $call->getReadOnlyResolvedParams($expression['parameters'], $context, $expression);
if ($symbolVariable) {
$context->codePrinter->output('zephir_fwrite(' . $symbolVariable->getName() . ', ' . $resolvedParams[0] . ', ' . $resolvedParams[1] . ');');
$context->codePrinter->output('zephir_fwrite(' . $symbolVariable->getName() . ', ' . $resolvedParams[0] . ', ' . $resolvedParams[1] . ' TSRMLS_CC);');
return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression);
} else {
$context->codePrinter->output('zephir_fwrite(NULL, ' . $resolvedParams[0] . ', ' . $resolvedParams[1] . ');');
$context->codePrinter->output('zephir_fwrite(NULL, ' . $resolvedParams[0] . ', ' . $resolvedParams[1] . ' TSRMLS_CC);');
}

return new CompiledExpression('null', 'null', $expression);
Expand Down

0 comments on commit 4801061

Please sign in to comment.