INI Directive Removed
When an ini directive such as mysql.allow_persistent
is removed, both ini_get()
and ini_set()
for it return false
.
$allowPersistent = ini_get('mysql.allow_persistent'); // result: false
Solution
You can safely replace both ini_get()
and ini_set()
occurrences for these directives to false
. For example:
$allowPersistent = false;
If the result is unused, you can remove the occurrences. If it's used as a condition, then you may be able to completely remove the block. For example:
- ini_set('mysql.allow_persistent');
- if (ini_get('mysql.allow_persistent')) {
- // This block is no longer reachable, because the expression always evaluates to false.
- }