Req #19333 [Com]: Assignment in Condition
| From: | diemuzi@gmail.com | Date: | Fri, 16 Mar 2012 14:11:30 +0000 |
| Subject: | Req #19333 [Com]: Assignment in Condition | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-8406@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
Comment by: diemuzi@gmail.com
Reported By: diemuzi at gmail dot com
Summary: Assignment in Condition
Status: Feedback
Type: Feature/Change Request
Package: System_Daemon
Operating System: Archlinux
Package Version: 1.0.0
PHP Version: 5.4.0
Roadmap Versions:
New Comment:
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 =)
Previous Comments:
------------------------------------------------------------------------
[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