contao-community-alliance / merger2

The Merger² for Contao.
GNU Lesser General Public License v3.0
8 stars 5 forks source link

Merger² Version 3.0.0 Update throws Errors by and condition & children function bug #7

Closed dev4web closed 6 years ago

dev4web commented 10 years ago

I just updated tody the merger² module in my contao 3.2.7 installation and the following combination children(>0) & depth(4) throws the following:

Fatal error: Uncaught exception Bit3\Contao\Merger2\Constraint\Parser\ParserException with message Invalid token, expect a "word" character got > thrown in system/modules/merger2/classes/src/Bit3/Contao/Merger2/Constraint/Parser/InputStream.php on line 218

Are there some syntax changes?

dev4web commented 10 years ago

Okay it works this way (Ubuntu 12.04 LTS with PHP 5.3): children(0)&&depth(4) depth(4) && children(0)

ADD: 2014-02-27 Error-Hint: Illegal boolean value: "false && true" ModuleMerger2.php on line 115 Works with Debian with PHP Version 5.5.4 FPM/FastCGI: depth(4) & children(0) (Only with space around &)

dev4web commented 10 years ago

Since i really appreciate your works and extensions i had to find out why the children function is not working well anymore and i think i found the following possible solution in StandardFunctions.php Line189:

New: return $objChildren->count >= (int) $intCount; Old: return $objChildren->count >= $intCount;

I got not the final clou on what when!? It seems that different server and php configurations different behaviour.

dmolineus commented 6 years ago

I cannot reproduce the issue at the current branch release/4.0.0. Changing the compare operator in the children function is supported now (See c947300).