[TYPO3-core] RFC #13739: "Show" clickmenu in page tree does not work for mount pages

Oliver Klee typo3-german-02 at oliverklee.de
Wed Mar 17 13:28:10 CET 2010


Hi,

Francois Suter schrieb:
> Hi,
> 
>> I agree with Peter, Zend complains all the time about assignments in
>> conditions, but it's a standard in TYPO3 with DB fetching while($row =
>> ...)
> 
> According to our CGLs they should be wrapped in a extra set of brackets.
> I don't know for Zend Studio, but for Netbeans it does remove the
> warnings. So it should be:
> 
> if (($mountPointInfo = $sys_page->getMountPointInfo($id))) {
> 
> although I don't quite like this style either.

We can split this on two lines. This will also greatly improve
readability. Like this:

$mountPointInfo = $sys_page->getMountPointInfo($id);
if ($mountPointInfo) {
}


(The problem with assignments in conditions is that it's not always
clear when reading the code whether they are intentional or a typo (=
instead of ==.)


Oli
-- 
Certified TYPO3 Integrator | TYPO3 Security Team Member


More information about the TYPO3-team-core mailing list