lib/files.php: make use of === instead of ==
This commit is contained in:
parent
16033c8123
commit
66aa9b4e27
1 changed files with 4 additions and 4 deletions
|
@ -51,7 +51,7 @@ class OC_Files {
|
||||||
$xsendfile = true;
|
$xsendfile = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_array($files) && count($files) == 1) {
|
if (is_array($files) && count($files) === 1) {
|
||||||
$files = $files[0];
|
$files = $files[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ class OC_Files {
|
||||||
if (isset($_SERVER['HTTP_RANGE']) &&
|
if (isset($_SERVER['HTTP_RANGE']) &&
|
||||||
preg_match("/^bytes=([0-9]+)-([0-9]*)$/", $_SERVER['HTTP_RANGE'], $range)) {
|
preg_match("/^bytes=([0-9]+)-([0-9]*)$/", $_SERVER['HTTP_RANGE'], $range)) {
|
||||||
$filelength = filesize($filename);
|
$filelength = filesize($filename);
|
||||||
if ($range[2] == "") {
|
if ($range[2] === "") {
|
||||||
$range[2] = $filelength - 1;
|
$range[2] = $filelength - 1;
|
||||||
}
|
}
|
||||||
header("Content-Range: bytes $range[1]-$range[2]/" . $filelength);
|
header("Content-Range: bytes $range[1]-$range[2]/" . $filelength);
|
||||||
|
@ -280,7 +280,7 @@ class OC_Files {
|
||||||
}
|
}
|
||||||
|
|
||||||
//don't allow user to break his config -- broken or malicious size input
|
//don't allow user to break his config -- broken or malicious size input
|
||||||
if (intval($size) == 0) {
|
if (intval($size) === 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -302,7 +302,7 @@ class OC_Files {
|
||||||
if ($content !== null) {
|
if ($content !== null) {
|
||||||
$htaccess = $content;
|
$htaccess = $content;
|
||||||
}
|
}
|
||||||
if ($hasReplaced == 0) {
|
if ($hasReplaced === 0) {
|
||||||
$htaccess .= "\n" . $setting;
|
$htaccess .= "\n" . $setting;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue