Changeset 738 for trunk/lib


Ignore:
Timestamp:
Nov 14, 2020 6:44:06 PM (3 years ago)
Author:
anonymous
Message:

Avoid use of get_magic_quotes_gpc() after PHP 5.4

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/App.inc.php

    r735 r738  
    223223        // Force getFormData, getPost, and getGet to always run dispelMagicQuotes() with stripslashes().
    224224        // This should be set to 'true' when using the codebase with Wordpress because
    225         // WP forcefully adds slashes to all input despite the setting of magic_quotes_gpc.
     225        // WP forcefully adds slashes to all input despite the setting of magic_quotes_gpc (which was removed from PHP in v5.4).
    226226        'always_dispel_magicquotes' => false,
    227227
  • trunk/lib/Utilities.inc.php

    r735 r738  
    10601060
    10611061    if (!isset($magic_quotes_gpc)) {
    1062         $magic_quotes_gpc = get_magic_quotes_gpc();
     1062        $magic_quotes_gpc = version_compare(PHP_VERSION, '5.4.0', '<') ? get_magic_quotes_gpc() : false;
    10631063    }
    10641064
Note: See TracChangeset for help on using the changeset viewer.