NamelessMC

felipesavazi

Member

Feed

There are no wall posts here yet.

About

Registered:
7 months ago
Last Seen:
about 1 month ago
Profile Views:
32

Latest Posts

about 1 month ago
com.google.gson.stream.MalformedJsonException: Use JsonReader.se



Uncaught Error

Undefined constant "PAGE"

(File: /data/core/templates/frontend_init.php)


Frame #3
/data/core/templates/frontend_init.php:32
Frame #2
/data/modules/Core/pages/api/v2/index.php:17
Frame #1
/data/index.php:115
File: /data/core/templates/frontend_init.php

define('FRONT_END', true);

// Set current page URL in session, provided it's not the login page
if(defined('PAGE') && PAGE != 'login' && PAGE != 'register' && PAGE != 404 && PAGE != 'maintenance' && (!isset($_GET['route']) || strpos($_GET['route'], '/queries') === false)){
	if(FRIENDLY_URLS === true){
		$split = explode('?', $_SERVER['REQUEST_URI']);

		if(count($split) > 1)
			$_SESSION['last_page'] = URL::build($split[0], $split[1]);
		else
			$_SESSION['last_page'] = URL::build($split[0]);

		if(defined('CONFIG_PATH'))
			$_SESSION['last_page'] = substr($_SESSION['last_page'], strlen(CONFIG_PATH));

	} else
		$_SESSION['last_page'] = URL::build($_GET['route']);

}

if (PAGE != 404) {
    // Auto unset signin tfa variables if set
    if (strpos($_GET['route'], '/queries/') === false && (isset($_SESSION['remember']) || isset($_SESSION['username']) || isset($_SESSION['email']) || isset($_SESSION['password'])) && (!isset($_POST['tfa_code']) && !isset($_SESSION['mcassoc']))) {
        unset($_SESSION['remember']);
        unset($_SESSION['username']);
        unset($_SESSION['email']);
        unset($_SESSION['password']);
    }
}

$template_path = ROOT_PATH . '/custom/templates/' . TEMPLATE;
$smarty->setTemplateDir($template_path);
$smarty->setCompileDir(ROOT_PATH . '/cache/templates_c');

if(file_exists(ROOT_PATH . '/custom/templates/' . TEMPLATE . '/template.php'))
	require(ROOT_PATH . '/custom/templates/' . TEMPLATE . '/template.php');
else
	require(ROOT_PATH . '/custom/templates/DefaultRevamp/template.php');

// User related actions
if($user->isLoggedIn()){
File: /data/modules/Core/pages/api/v2/index.php

            die();
        }
    } else {
        // Use recursion to check - might have URL parameters in path
        $path_array = explode('/', $route);

        for ($i = count($path_array) - 2; $i > 0; $i--) {

            $new_path = '/';
            for($n = 1; $n <= $i; $n++){
                $new_path .= $path_array[$n] . '/';
            }

            $new_path = rtrim($new_path, '/');

            if (array_key_exists($new_path, $modules)) {
                $path = join(DIRECTORY_SEPARATOR, array(ROOT_PATH, 'modules', $modules[$new_path]['module'], $modules[$new_path]['file']));

                if (file_exists($path)) {
                    $pages->setActivePage($modules[$new_path]);
                    require($path);
                    die();
                }
            }

        }

        // 404
        require(ROOT_PATH . '/404.php');
    }
}

about 1 month ago
com.google.gson.stream.MalformedJsonException: Use JsonReader.se

It is API error

about 1 month ago
com.google.gson.stream.MalformedJsonException: Use JsonReader.se

How to fix it?