Ejemplo n.º 1
0
 public function testRegisterLongArray()
 {
     Emulate::registerLongArrays();
     $this->assertTrue(isset($GLOBALS['HTTP_ENV_VARS']));
     $this->assertTrue(isset($GLOBALS['HTTP_GET_VARS']));
     $this->assertTrue(isset($GLOBALS['HTTP_POST_VARS']));
     $this->assertTrue(isset($GLOBALS['HTTP_COOKIE_VARS']));
     $this->assertTrue(isset($GLOBALS['HTTP_SERVER_VARS']));
     $this->assertTrue(isset($GLOBALS['HTTP_FILES_VARS']));
 }
Ejemplo n.º 2
0
<?php

if (version_compare(PHP_VERSION, '5.4.0') >= 0) {
    if (!isset($_ENV)) {
        \DBSeller\Legacy\PHP53\Emulate::env();
    }
    /**
     * Register LongArrays
     */
    \DBSeller\Legacy\PHP53\Emulate::registerLongArrays();
    if (!ini_get('register_globals')) {
        \DBSeller\Legacy\PHP53\Emulate::registerGlobals();
    }
    if (!ini_get('magic_quotes_gpc')) {
        \DBSeller\Legacy\PHP53\Emulate::magicQuotesGPCR();
    }
    if (!function_exists('session_register')) {
        /**
         * Register one or more global variables with the current session
         * @return bool
         */
        function session_register()
        {
            return call_user_func_array('\\DBSeller\\Legacy\\PHP53\\Emulate::sessionRegister', func_get_args());
        }
        /**
         * Unregister a global variable from the current session
         *
         * @param  String $key Name
         * @return bool
         */