mythinking / doophp

Automatically exported from code.google.com/p/doophp
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

acceptType in dooController throws error because of accept header not defined #80

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If the client did not define an accept type, calling acceptType on the 
controller will throw an error

What is the expected output? What do you see instead?
error throwing: PHP Notice:  Undefined index: HTTP_ACCEPT in 
/var/www/html/dooframework/controller/DooController.php on line 296
Mostly seem to be spider traffic

Potential fix:
    public function acceptType(){
        if (!array_Key_exists("HTTP_ACCEPT", $_SERVER))
            return NULL;

        $type = array(
            '*/*'=>'*',

Original issue reported on code.google.com by oliv...@climberbeta.com on 13 Dec 2011 at 6:59

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r702.

Original comment by darkredz on 1 Mar 2012 at 3:04