[exim-dev] [Bug 672] strict_acl_vars failures in the unused …

Top Page
Delete this message
Reply to this message
Author: Brad "anomie" Jorsch
Date:  
To: exim-dev
Subject: [exim-dev] [Bug 672] strict_acl_vars failures in the unused half of a conditional
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=672




--- Comment #2 from Brad "anomie" Jorsch <anomie@???> 2008-02-21 17:53:58 ---
Created an attachment (id=233)
--> (http://bugs.exim.org/attachment.cgi?id=233)
Patch to have find_variables never return null when skipping (with bug 474)

Consider this:
${if isset:acl_m_foo {$acl_m_foo}{foo is not available}}

If $acl_m_foo is not set, the condition will be false. Since the "true" half is
unused, there is no reason it should give an error there.

Turning off strict_acl_vars isn't an option, since the point of this is to have
some way to handle a possibly-unset variable when strict_acl_vars IS set.
Setting the variable requires finding and handling every path where the
variable could be unset and setting it explicitly; while possible, why bother
if you can just check for unsetness directly?

OTOH, you are correct that acl vars shouldn't be special. This new patch
eliminates all undefined variable errors in the unused half of a conditional.
Two versions are needed, depending on whether the patch from bug #474 has been
applied or not.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email