Req #19333 [Fbk->Csd]: Assignment in Condition

From: Date: Fri, 16 Mar 2012 14:57:43 +0000
Subject: Req #19333 [Fbk->Csd]: Assignment in Condition
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-8407@lists.php.net to get a copy of this message
Edit report at https://pear.php.net/bugs/bug.php?id=19333&edit=1 ID: 19333 Updated by: kvz@php.net Reported By: diemuzi at gmail dot com Summary: Assignment in Condition -Status: Feedback +Status: Closed Type: Feature/Change Request Package: System_Daemon Operating System: Archlinux Package Version: 1.0.0 PHP Version: 5.4.0 -Assigned To: +Assigned To: kvz Roadmap Versions: New Comment: -Status: Feedback +Status: Closed -Assigned To: +Assigned To: kvz This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. Fixed in https://github.com/kvz/system_daemon/pull/6 . Thank you! Previous Comments: ------------------------------------------------------------------------ [2012-03-16 14:11:29] diemuzi Actually that would be great. Here is the pull request: https://github.com/kvz/system_daemon/pull/6 Testing appears to work just as-before but without any Assignment in Condition notices =) ------------------------------------------------------------------------ [2012-03-16 12:22:15] kvz -Status: Open +Status: Feedback Would you be interested in editting the file on github (https://github.com/kvz/system_daemon/blob/master/System/Daemon/OS.php) and sending me a pull request? This will get you listed as a contributor. ------------------------------------------------------------------------ [2012-03-15 18:48:33] diemuzi Description: ------------ In the file System/Daemon/OS.php there exists an Assignment in Condition on line 324: if (($rm = file_exists($path))) { Although this doesn't pose any risk, I'd suggest writing it this way to remove the Assignment in Condition notice: if (false !== ($rm = file_exists($path))) { The same exists on line 593: while ($class = get_parent_class($class)) { Again I would recommend writing it this way: while (false !== ($class = get_parent_class($class))) { ------------------------------------------------------------------------ -- Edit this bug report at https://pear.php.net/bugs/bug.php?id=19333&edit=1

« previous php.pear.bugs (#8407) next »