PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTML » HTML_Template_Flexy » Bug #3397

Warning Notices

Details

Submitted2005-02-07 23:34 UTC
Fromweshays at gbdev dot com
StatusSuspended
PackageHTML_Template_Flexy
PHP VersionIrrelevant
OSSuSE linux 9.1
Roadmaps(Not assigned)

Comments

[2005-02-07 23:34 UTC] weshays at gbdev dot com

Description:
------------
I have come across two warning notices that I feel I should bring to your attention. Both involve using "!count(...)" which I replaced with "empty(...)" and both only occur if the compiled files have not been created yet. Once the compiled files are created the notices will not show up. By making the following changes notices will be corrected.

I checked the CVS tree and this has not been fixed yet.

1)
--------------------------------------------

Notice: Undefined property: HTML_Template_Flexy_Token_Text::$argTokens in /usr/local/lib/php/HTML/Template/Flexy/Compiler/Standard.php on line 673

if (!count($element->argTokens) && !$element->isWord()) {
return $this->appendHtml($element->value);
}

changed "!count" to "empty" because at this point argTokens is not defined and the "empty" will keep from having to add "isset($element->argTokens)" to the if-statement.

if (empty($element->argTokens) && !$element->isWord()) {
return $this->appendHtml($element->value);
}
--------------------------------------------

The second notice occurs once the first notice is corrected and the compiled files do not exist yet.

2)
--------------------------------------------
Notice: Undefined property: HTML_Template_Flexy_Token_Text::$argTokens in /usr/local/lib/php/HTML/Template/Flexy/Compiler/Standard.php on line 692

if (!count($element->argTokens)) {
return $this->appendHtml($front . $value . $rear);
}

changed "!count" to "empty" for same reason as in notice 1.

if (empty($element->argTokens)) {
return $this->appendHtml($front . $value . $rear);
}