Hi Lucas,
I'm using your AndIf snippet on a XAMPP 1.8.1 installation and a recently moved site using MODX REVO 2.2.5 and 2.2.6PL. On my original installation of XAMPP (1.7.1 b5), I didn't have problems with it, but in this new installation, I'm encountering this PHP Notice message:
<b>Notice</b>: Use of undefined constant compareSubject - assumed 'compareSubject' in <b>E:\xampp\htdocs\mysite\core\cache\includes\elements\modsnippet\15.include.cache.php</b> on line <b>59</b>
Not sure why this is appearing.. Have you encountered this before?
Very useful snippet by the way
Update:
Found the answer in this thread:
http://stackoverflow.com/questions/2509624/php-use-of-undefined-constant-error
It seems the error is caused by the lack of quotes in line 53:
if(!function_exists(compareSubject)) {
So to fix this, I just added the " and " before and after compareSubject:
if(!function_exists("compareSubject")) {
In case anyone's encountering this problem
[ed. note: diatomin last edited this post 11 years, 3 months ago.]