Bug #22731 Version Retired

Custom plugin function in a conditional throws a PHP warning

Version: 2.10.3 Reporter: ericswierczek

This is an archived bug report. If you are experiencing a similar issue, upgrade to the latest release and if that does not solve the problem, submit a new bug report

If I have a custom plugin function that I want to use in a conditional like so:

{if {exp:custom_plugin:custom_function}{/exp:custom_plugin:custom_function}} … {/if}

In PHP I can just do return true; or return false; for the correct template logic, but I get a PHP warning when writing the template conditional this way.

Severity: Warning Message: Invalid argument supplied for foreach() Filename: Conditional/BooleanExpression.php Line Number: 151

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases