WordPress.org

Make WordPress Core

Ticket #13915: 13915.patch

File 13915.patch, 536 bytes (added by jacobsantos, 8 years ago)

Prevent WP_Http_Fopen from being used on PHP5+

  • class-http.php

     
    911911         * @return boolean False means this class can not be used, true means it can.
    912912         */
    913913        function test($args = array()) {
     914                if ( version_compare(PHP_VERSION, '5.0', '>=') ) // PHP4 only backwards compat.
     915                        return false;
     916
    914917                if ( ! function_exists('fopen') || (function_exists('ini_get') && true != ini_get('allow_url_fopen')) )
    915918                        return false;
    916919