11<?php
22
3- require './ facebook.php ' ;
3+ require 'facebook.php ' ;
44
55/**
66 * @owner naitik
@@ -424,6 +424,12 @@ public function testLoginStatusURLCustom() {
424424 }
425425
426426 public function testMagicQuotesQueryString () {
427+ if (!get_magic_quotes_gpc ()) {
428+ // this test cannot run without get_magic_quotes_gpc(), and the setting
429+ // cannot be modified at runtime, so we're shit out of luck. thanks php.
430+ return ;
431+ }
432+
427433 // @style-override allow json_encode call
428434 $ _GET ['session ' ] = addslashes (json_encode (self ::$ VALID_EXPIRED_SESSION ));
429435 $ facebook = new Facebook (array (
@@ -437,6 +443,12 @@ public function testMagicQuotesQueryString() {
437443 }
438444
439445 public function testMagicQuotesCookie () {
446+ if (!get_magic_quotes_gpc ()) {
447+ // this test cannot run without get_magic_quotes_gpc(), and the setting
448+ // cannot be modified at runtime, so we're shit out of luck. thanks php.
449+ return ;
450+ }
451+
440452 $ cookieName = 'fbs_ ' . self ::APP_ID ;
441453 $ session = self ::$ VALID_EXPIRED_SESSION ;
442454 $ _COOKIE [$ cookieName ] = addslashes ('" ' . http_build_query ($ session ) . '" ' );
@@ -505,7 +517,7 @@ public function testSecureCurrentUrlWithNonDefaultPort() {
505517 public function testIgnoreArgSeparatorForCookie () {
506518 $ cookieName = 'fbs_ ' . self ::APP_ID ;
507519 $ session = self ::$ VALID_EXPIRED_SESSION ;
508- $ _COOKIE [$ cookieName ] = addslashes ( '" ' . http_build_query ($ session ) . '" ' ) ;
520+ $ _COOKIE [$ cookieName ] = '" ' . http_build_query ($ session ) . '" ' ;
509521 ini_set ('arg_separator.output ' , '& ' );
510522 // ensure we're testing what we expect
511523 $ this ->assertEquals (http_build_query (array ('a ' => 1 , 'b ' => 2 )),
0 commit comments