mikecao/flight — Issue #6: Undefined index
Author: Halaur
Created: 2012-01-04 05:48:54+00:00
State: open

I just restored default error handler and got multiple notices.

Notice: ob_end_clean() [ref.outcontrol]: failed to delete buffer. No buffer to delete in D:\www\flight\net\Response.php on line 154
Notice: Undefined index: router in D:\www\flight\core\Dispatcher.php on line 74
Notice: Undefined offset: 1 in D:\www\flight\net\Router.php on line 61
Notice: Undefined index: router in D:\www\flight\core\Dispatcher.php on line 74
Notice: Undefined index: request in D:\www\flight\core\Dispatcher.php on line 74
Notice: Undefined index: HTTP_X_REQUESTED_WITH in D:\www\flight\net\Request.php on line 50
Notice: Undefined index: CONTENT_TYPE in D:\www\flight\net\Request.php on line 54
Notice: Undefined index: CONTENT_LENGTH in D:\www\flight\net\Request.php on line 55
Notice: Undefined index: GET in D:\www\flight\net\Router.php on line 123
Strict Standards: Only variables should be passed by reference in D:\www\flight\Flight.php on line 279
hello world!
Notice: Undefined index: response in D:\www\flight\core\Dispatcher.php on line 74

Here is my code:

require 'flight/Flight.php';
restore_exception_handler();
restore_error_handler();
error_reporting (-1);
Flight::route('/', function(){
echo 'hello world!';
});
Flight::start();