@@ -705,7 +705,7 @@ public static function ajax($options = array(), $xhr = null) {
705
705
}
706
706
// JSONP
707
707
$ jsre = "/= \\?(&|$)/ " ;
708
- if ($ options ['dataType ' ] == 'jsonp ' ) {
708
+ if (isset ( $ options [ ' dataType ' ]) && $ options ['dataType ' ] == 'jsonp ' ) {
709
709
$ jsonpCallbackParam = $ options ['jsonp ' ]
710
710
? $ options ['jsonp ' ] : 'callback ' ;
711
711
if (strtolower ($ options ['type ' ]) == 'get ' ) {
@@ -726,7 +726,7 @@ public static function ajax($options = array(), $xhr = null) {
726
726
}
727
727
$ options ['dataType ' ] = 'json ' ;
728
728
}
729
- if ($ options ['dataType ' ] == 'json ' ) {
729
+ if (isset ( $ options [ ' dataType ' ]) && $ options ['dataType ' ] == 'json ' ) {
730
730
$ jsonpCallback = 'json_ ' .md5 (microtime ());
731
731
$ jsonpData = $ jsonpUrl = false ;
732
732
if ($ options ['data ' ]) {
@@ -835,11 +835,11 @@ public static function ajax($options = array(), $xhr = null) {
835
835
// return new phpQueryAjaxResponse($response, $domId);
836
836
}
837
837
protected static function httpData ($ data , $ type , $ options ) {
838
- if ($ options ['dataFilter ' ])
838
+ if (isset ( $ options [ ' dataFilter ' ]) && $ options ['dataFilter ' ])
839
839
$ data = self ::callbackRun ($ options ['dataFilter ' ], array ($ data , $ type ));
840
840
if (is_string ($ data )) {
841
841
if ($ type == "json " ) {
842
- if ($ options ['_jsonp ' ]) {
842
+ if (isset ( $ options [ ' _jsonp ' ]) && $ options ['_jsonp ' ]) {
843
843
$ data = preg_replace ('/^\s*\w+\((.*)\)\s*$/s ' , '$1 ' , $ data );
844
844
}
845
845
$ data = self ::parseJSON ($ data );
0 commit comments