mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Minor conditions simplify (#10397)
This commit is contained in:
parent
8086baa981
commit
f89fe830f2
4 changed files with 4 additions and 4 deletions
|
@ -1965,7 +1965,7 @@ int phar_detect_phar_fname_ext(const char *filename, size_t filename_len, const
|
|||
*ext_str = NULL;
|
||||
*ext_len = 0;
|
||||
|
||||
if (!filename_len || filename_len == 1) {
|
||||
if (filename_len <= 1) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
|
|
|
@ -496,7 +496,7 @@ carry_on:
|
|||
zend_throw_exception_ex(phar_ce_PharException, 0, "Mounting of %s to %s within phar %s failed", path, actual, arch);
|
||||
}
|
||||
|
||||
if (entry && path && path == entry) {
|
||||
if (entry && path == entry) {
|
||||
efree(entry);
|
||||
}
|
||||
|
||||
|
|
|
@ -1257,7 +1257,7 @@ phar_entry_info *phar_get_entry_info_dir(phar_archive_data *phar, char *path, si
|
|||
}
|
||||
|
||||
if (is_dir) {
|
||||
if (!path_len || path_len == 1) {
|
||||
if (path_len <= 1) {
|
||||
return NULL;
|
||||
}
|
||||
path_len--;
|
||||
|
|
|
@ -215,7 +215,7 @@
|
|||
doc_rate.disabled = false;
|
||||
} else {
|
||||
delay = parseInt(doc_rate.value);
|
||||
if (!delay || delay < 1) {
|
||||
if (isNaN(delay) || delay < 1) {
|
||||
doc_status.innerHTML = "Not valid 'refresh' value";
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue