Nested if statements failing on php upgrade

Any clever folks out there have a solution..

            {{ entries:listing from="FOLDERNAME" }} 
                {{ schedule }} 
                {{ if monday|not_empty }}
                    {{ if portfolio }}
                    {{ portfolio limit="1" }}
                        <li><img class="desaturate" src="{{ pic }}" alt="{{ caption }}">
                    {{ /portfolio }}
                    {{ else }}
                        <li><img src="/assets/img/filler.jpg" alt="filler image">
                    {{ endif }}
                    <a class="button alert expand" href="{{ url }}">{{ title }}</a>
                    {{ endif }}
                {{ /schedule }}
            {{ /entries:listing }}

This used to work.. it basically looks at a schedule, a grid of one row with a checkbox for each day, then displays either their 1st portfolio picture or a filler image if they are available on that day.

The individual pieces of code work, but together in a nested if formation they now fail. I presume there is some change in PHP or perhaps I need a specific php module not installed but any pointers would be appreciated.

Answered by Richard Noakes!
>>>>>>> Answered <<<<<<<
3 Replies
1 Follower