Twig: Template outputting only "0" don't render anything

Created on 11 Nov 2019  ·  4Comments  ·  Source: twigphp/Twig

Consider the following template:

0

Rendering that template outputs nothing:

https://twigfiddle.com/ayv6cz

The compiled template looks like this:

protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 1
        echo "0";
    }

This is strange: echoing 0 or "0" in PHP ouputs "0".

Most helpful comment

Thanks @ericmorand & @xabbuh I've fixed the issue on twigfiddle side.
Apologies for the noise.

Have a good day,
Alain

All 4 comments

Maybe that's just an issue of twigfiddle.com.

Good point. Let me check with command line.

@xabbuh You are absolutely right. It works ex expected from the command line. Closing this issue and opening one on twigfiddle repository. Thanks for your help.

Thanks @ericmorand & @xabbuh I've fixed the issue on twigfiddle side.
Apologies for the noise.

Have a good day,
Alain

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maidmaid picture maidmaid  ·  5Comments

yguedidi picture yguedidi  ·  4Comments

mnapoli picture mnapoli  ·  5Comments

mpdude picture mpdude  ·  3Comments

dvladimirov77 picture dvladimirov77  ·  5Comments