View Issue Details

IDProjectCategoryView StatusLast Update
0026964mantisbtbugtrackerpublic2021-03-07 18:29
Reporterlega4 Assigned Toatrol  
PrioritynormalSeverityminorReproducibilitysometimes
Status closedResolutionfixed 
Target Version2.25.0Fixed in Version2.25.0 
Summary0026964: Admin check always has "WARN" for magic_quotes checks (PHP 7.4)
Description

Seems like magic quotes check are always raising a warning no matter what.

magic_quotes_gpc php.ini directive is disabled WARN
DEPRECATED: Function get_magic_quotes_gpc() is deprecated
Raised in file /var/www/html/admin/check/check_php_inc.php on line 120

I've tried to add explicit settings to my php.ini, but it doesn't change anything, also as per https://stackoverflow.com/a/18683025/1657819, magic quotes are permanently disabled since PHP 5.4.
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off

Suggestion => remove magic quotes checks completely as they're not relevant in 2020 any more

Steps To Reproduce
  1. Install MantisBT in a clean PHP 7.4 environment
  2. Go to /admin/check pages
Additional Information

Doesn't seem to be reproducible with PHP 7.2, at least I have another environment and don't see it there... Might be some other issue, no idea :(

TagsNo tags attached.
Attached Files
image.png (51,761 bytes)   
image.png (51,761 bytes)   

Activities

atrol

atrol

2020-05-18 16:47

developer   ~0064001

Thanks @lega4 for reportimg the issue.

PR https://github.com/mantisbt/mantisbt/pull/1671

Related Changesets

MantisBT: master ef6160ff

2020-05-18 12:33

atrol

Committer: dregad


Details Diff
Remove get_magic_quotes_* checks

Our minimum supported PHP version is 5.5.0.

Starting from PHP 5.4.0, get_magic_quotes_runtime and get_magic_quotes_gpc
always return FALSE, as the magic quotes feature was removed from PHP.
So the check is no longer needed.

Starting from 7.4.0 the functions have been deprecated.

Fixes 0026964
Affected Issues
0026964
mod - admin/check/check_php_inc.php Diff File