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