View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0032714 | mantisbt | code cleanup | public | 2023-06-10 10:31 | 2023-10-31 16:32 |
Reporter | atrol | Assigned To | atrol | ||
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Target Version | 2.26.0 | Fixed in Version | 2.26.0 | ||
Summary | 0032714: Remove function check_php_version() | ||||
Description | function check_php_version is questionable in some terms
Thus
[1] https://www.php.net/manual/de/function.version-compare.php | ||||
Tags | No tags attached. | ||||
MantisBT: master 4b638dde 2023-06-10 10:51 Details Diff |
Remove function check_php_version function check_php_version is questionable in some terms - check for $p_version == PHP_MIN_VERSION will hardly ever evaluate to true in real life (who is running exactly PHP 7.0.0?) - parameter $p_version is not used in else case, this was hardly what was wanted, but did not introduce any bug, as phpversion() is used instead of the parameter - check function_exists( 'version_compare' ) is not necessary as - according documentation, version_compare() is available starting from PHP 4.1 [1] - we use version_compare() at various other places in code without checking if it exists Thus - remove the function - replace the single place where it's called by using version_compare() Fixes 0032714 [1] https://www.php.net/manual/de/function.version-compare.php |
Affected Issues 0032714 |
|
mod - admin/install.php | Diff File | ||
mod - core/install_helper_functions_api.php | Diff File | ||
MantisBT: master 024ead1a 2023-06-10 17:01 Details Diff |
Remove unreachable code Minimum PHP version is checked in an early state in core.php and treated as a FATAL error calling die(), so this code can never be reached Issue 0032714 |
Affected Issues 0032714 |
|
mod - admin/check/check_php_inc.php | Diff File | ||
mod - admin/install.php | Diff File |