Skip to content

Commit

Permalink
implicit non strict comparision in in_array
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Feb 14, 2016
1 parent 7c209a2 commit bdb7086
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/base/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ public function chmod($value)
public function chown($value)
{
$ownergroup = $this->getOwner() . ':' . $this->getGroup();
if (in_array($value, [$ownergroup, $this->getOwner(), $this->getUid()])) {
if (in_array($value, [$ownergroup, $this->getOwner(), $this->getUid()], false)) {
return;
}
passthru("chown $value $this->path");
Expand All @@ -343,7 +343,7 @@ public function chown($value)

public function chgrp($value)
{
if (in_array($value, [$this->getGroup(), $this->getGid()])) {
if (in_array($value, [$this->getGroup(), $this->getGid()], false)) {
return;
}
passthru("chgrp $value $this->path");
Expand Down

0 comments on commit bdb7086

Please sign in to comment.