mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
修复$_SERVER["HTTP_ACCEPT"]不存在时的notice错误
This commit is contained in:
@@ -102,6 +102,10 @@ abstract class rest
|
|||||||
*/
|
*/
|
||||||
public static function getAcceptType()
|
public static function getAcceptType()
|
||||||
{
|
{
|
||||||
|
if (!isset($_SERVER['HTTP_ACCEPT'])) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$type = [
|
$type = [
|
||||||
'html' => 'text/html,application/xhtml+xml,*/*',
|
'html' => 'text/html,application/xhtml+xml,*/*',
|
||||||
'xml' => 'application/xml,text/xml,application/x-xml',
|
'xml' => 'application/xml,text/xml,application/x-xml',
|
||||||
@@ -127,6 +131,7 @@ abstract class rest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user