[dev] Horde_UI_Tabs :: bugfix

Joel Vandal jvandal at infoteck.qc.ca
Thu Mar 18 06:21:14 PST 2004


Hi,

When I open an application that use Horde_UI_Tabs, I always get this error :

 >>> Fatal error: Call to a member function on a non-object in /usr/share/pear/Horde/UI/Tabs.php on line 70

If I change the require_once line (see patch), it's solve this problem. Also, the $width give some long number when divided by an odd number
(ex. 100/3 = 33.3333333%) (or 33,33333... on my locale), so I floor the result to get only 33% and the display is now ok.


Index: Tabs.php
===================================================================
RCS file: /repository/framework/UI/UI/Tabs.php,v
retrieving revision 1.12
diff -r1.12 Tabs.php
3c3
< require_once 'Horde/UI/Widget.php';
---
> require_once dirname(__FILE__) . '/Widget.php';
68c68
<         $width = 100.0 / count($this->_tabs);
---
>         $width = floor(100.0 / count($this->_tabs));


-- 
Joel Vandal                                    Infoteck Internet
http://www.infoteck.qc.ca            Tel.  819-370-3232
jvandal at infoteck.qc.ca                 Fax. 819-370-3624


More information about the dev mailing list