pup bug ?

From: Date: Fri, 02 Jul 2004 13:43:01 +0000
Subject: pup bug ?
Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-2433@lists.php.net to get a copy of this message
<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

« previous php.smarty.dev (#2433) next »