08-17-2008, 02:34 AM
|
#2 (permalink)
|
|
The Wanderer
Join Date: Aug 2008
Posts: 11
Thanks: 4
|
Its the brackets. ( 'categories' || 'versions' ) would evaluate to TRUE on its own - so the comparison you're actually doing is:
PHP Code:
if( $list_type != true ){...}
It looks like what you actually want is:
PHP Code:
if ($list_type != 'categories' && $list_type != 'versions')) { trigger_error('Invalid list type', E_USER_NOTICE); return; }
Which should work as you expect.
|
|
|
|