View Single Post
Old 08-17-2008, 02:34 AM   #2 (permalink)
Theo
The Wanderer
 
Join Date: Aug 2008
Posts: 11
Thanks: 4
Theo is on a distinguished road
Default

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.
Theo is offline  
Reply With Quote