[Bug 573] New - Bug with hasFeature() in lib/Browser.php?

bugs@bugs.horde.org bugs@bugs.horde.org
Sat, 13 Jan 2001 02:42:31 -0400


http://bugs.horde.org/show_bug.cgi?id=573

*** shadow/573	Sat Jan 13 02:42:30 2001
--- shadow/573.tmp.13674	Sat Jan 13 02:42:30 2001
***************
*** 0 ****
--- 1,36 ----
+ Bug#: 573
+ Product: Horde
+ Version: 2.3 Unstable
+ Platform: PHP Code
+ OS/Version: other
+ Status: NEW   
+ Resolution: 
+ Severity: normal
+ Priority: P2
+ Component: Core
+ Area: BUILD
+ AssignedTo: chuck@horde.org                            
+ ReportedBy: ying@zippydesign.com               
+ URL: 
+ Summary: Bug with hasFeature() in lib/Browser.php?
+ 
+ Hello,
+ 
+ I had to tweak the hasFeature() function in lib/Browser.php to make it work 
+ properly for me.  It was returning true on browser features that were not there 
+ (ie. WML).  So I added an extra condition on it:
+ 
+ function hasFeature($feature)
+ {
+     return in_array($feature, $this->features) && $this->features[$feature];
+ }
+ 
+ as opposed to
+ 
+ function hasFeature($feature)
+ {
+     return in_array($feature, $this->features);
+ }
+ 
+ Other than that everything works great!  Can't wait until the new IMP goes 
+ stable, by the looks of things it is a HUGE improvement over 2.2!