pup bug ?

pete M <[email protected]>
Newsgroups gmane.comp.php.smarty.devel
Message-ID <[email protected]>
<a href="#" {popup sticky=true caption="Work Details" trigger="onclick"
		text=$slots[s].work_details}>

if the $text is empty then the error message

Warning: Smarty error: overlib: attribute 'text' or 'inarray' or 
'function' required in 
/home/jp/public_html/includes/Smarty-2.6.2/libs/Smarty.class.php on line 
1101

got round the problem by adding the following line in the popup function

  $text =  (empty($text)) ? '&nbsp;' : $text;

before
if (empty($text) && !isset($inarray) && empty($function)) {
         $smarty->trigger_error("overlib: attribute 'text' or 'inarray' 
or 'function' required");
         return false;
     }


Is it really nesessary to raise an error if text is empty - in my case a 
comments field from a database ?

Pete

-- 
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.