Replace is_null() with === / !== NULL
Exact same behavior, but faster. I also think it's more readable.
diff --git a/system/libraries/Ftp.php b/system/libraries/Ftp.php
index b8729a9..dc6bbd2 100644
--- a/system/libraries/Ftp.php
+++ b/system/libraries/Ftp.php
@@ -266,7 +266,7 @@
}
// Set file permissions if needed
- if ( ! is_null($permissions))
+ if ($permissions !== NULL)
{
$this->chmod($path, (int) $permissions);
}
@@ -320,7 +320,7 @@
}
// Set file permissions if needed
- if ( ! is_null($permissions))
+ if ($permissions !== NULL)
{
$this->chmod($rempath, (int) $permissions);
}