Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
274 additions
and
260 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,35 @@ | ||
<?php | ||
|
||
/** | ||
* PHP Polyfill | ||
* PHP Polyfill. | ||
* | ||
* @author Greg Roach <fisharebest@gmail.com> | ||
* @copyright (c) 2016 Greg Roach | ||
* @license MIT or GPLv3+ | ||
*/ | ||
|
||
use Fisharebest\PhpPolyfill\Php; | ||
use Fisharebest\PhpPolyfill\Php54; | ||
|
||
if (PHP_VERSION_ID < 50400) { | ||
// Magic quotes were removed in PHP 5.4 | ||
if (get_magic_quotes_gpc()) { | ||
Php54::removeMagicQuotes(); | ||
} | ||
// Magic quotes were removed in PHP 5.4 | ||
if (get_magic_quotes_gpc()) { | ||
Php54::removeMagicQuotes(); | ||
} | ||
|
||
// The global session variable bug/feature was removed in PHP 5.4 | ||
if (ini_get('session.bug_compat_42')) { | ||
ini_set('session.bug_compat_42', '0'); | ||
} | ||
// The global session variable bug/feature was removed in PHP 5.4 | ||
if (ini_get('session.bug_compat_42')) { | ||
ini_set('session.bug_compat_42', '0'); | ||
} | ||
|
||
// Add features that were introduced in PHP 5.4 | ||
if (!function_exists('http_response_code')) { | ||
function http_response_code($reponse_code = null) { return Php54::httpResponseCode($reponse_code); } | ||
} | ||
// Add features that were introduced in PHP 5.4 | ||
if (!function_exists('http_response_code')) { | ||
function http_response_code($reponse_code = null) | ||
{ | ||
return Php54::httpResponseCode($reponse_code); | ||
} | ||
} | ||
} | ||
|
||
if (!defined('INF')) { | ||
define('INF', PHP::inf()); | ||
define('INF', PHP::inf()); | ||
} |
Oops, something went wrong.