The following warnings occurred:
Warning [2] Undefined array key "threadviews_countguests" - Line: 745 - File: showthread.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php 745 errorHandler->error_callback
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 830 postParser->parse_message
/showthread.php 916 build_postbit
Warning [2] Undefined property: MyLanguage::$thread_modes - Line: 46 - File: showthread.php(1650) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php(1650) : eval()'d code 46 errorHandler->error_callback
/showthread.php 1650 eval




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
404 management
#1
404 errors seems to not be catch.
When I look the code, I don't understand how it is supposed to work.
You can see my comments in the code below.
Code:
if (! file_exists($file)) {
    if (file_exists($file_404))    {
        $file = $file_404;
        exec_action('error-404');
    }
}

/*******************************
Why is there no "else" here ? it sould avoid notices on $data_index properties if the file doesn't exists
********************************/

$data_index = getXML($file);
[...]
$url = $data_index->url;
[...]

/*******************************
I think there are some problems between 403 and 404 and a test on $url is useless because in the case of 404, the url will be empty
********************************/
# if page is private, send to 404 error page
if ($private == 'Y') {
    header('Location: 403');
    exit;
}

# if page does not exist, throw 404 error
if ($url == '403') {
    header('HTTP/1.0 404 Not Found');
}
Reply


Messages In This Thread
404 management - by spilarix - 2010-05-07, 21:00:56
404 management - by Zegnåt - 2010-05-08, 02:07:07
404 management - by spilarix - 2010-05-08, 21:46:30
404 management - by Zegnåt - 2010-05-08, 23:27:18



Users browsing this thread: 2 Guest(s)