From: Greg Beaver Date: Fri, 13 Nov 2009 00:58:11 +0000 (+0000) Subject: fix PHP Bug #49938: Phar::isBuffering() returns inverted value X-Git-Tag: php-5.4.0alpha1~191^2~2398 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=641a9977b7663b2c257950bcec9d1c7e62f315ae;p=php fix PHP Bug #49938: Phar::isBuffering() returns inverted value --- diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 5f529c480e..53eb8c82ec 100755 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -2945,7 +2945,7 @@ PHP_METHOD(Phar, isBuffering) { PHAR_ARCHIVE_OBJECT(); - RETURN_BOOL(!phar_obj->arc.archive->donotflush); + RETURN_BOOL(phar_obj->arc.archive->donotflush); } /* }}} */ diff --git a/ext/phar/tests/phar_begin_setstub_commit.phpt b/ext/phar/tests/phar_begin_setstub_commit.phpt index 42556c3fb6..9d3e38323e 100755 --- a/ext/phar/tests/phar_begin_setstub_commit.phpt +++ b/ext/phar/tests/phar_begin_setstub_commit.phpt @@ -36,8 +36,8 @@ var_dump($p->getStub()); unlink(dirname(__FILE__) . '/brandnewphar.phar'); ?> --EXPECT-- -bool(true) bool(false) +bool(true) string(5) "Hello" string(84) " " @@ -45,7 +45,7 @@ string(5) "World" string(85) " " ===COMMIT=== -bool(true) +bool(false) string(5) "Hello" string(5) "World" string(85) " diff --git a/ext/phar/tests/phar_begin_setstub_commitU.phpt b/ext/phar/tests/phar_begin_setstub_commitU.phpt index c7665576b1..805e762320 100644 --- a/ext/phar/tests/phar_begin_setstub_commitU.phpt +++ b/ext/phar/tests/phar_begin_setstub_commitU.phpt @@ -36,8 +36,8 @@ var_dump($p->getStub()); unlink(dirname(__FILE__) . '/brandnewphar.phar'); ?> --EXPECT-- -bool(true) bool(false) +bool(true) unicode(5) "Hello" string(84) " " @@ -45,7 +45,7 @@ unicode(5) "World" string(85) " " ===COMMIT=== -bool(true) +bool(false) unicode(5) "Hello" unicode(5) "World" string(85) " diff --git a/ext/phar/tests/tar/phar_begin_setstub_commit.phpt b/ext/phar/tests/tar/phar_begin_setstub_commit.phpt index 693b7eda9e..d18f32ed3b 100755 --- a/ext/phar/tests/tar/phar_begin_setstub_commit.phpt +++ b/ext/phar/tests/tar/phar_begin_setstub_commit.phpt @@ -37,8 +37,8 @@ unlink(dirname(__FILE__) . '/brandnewphar.phar.tar'); ?> --EXPECT-- bool(true) -bool(true) bool(false) +bool(true) string(5) "Hello" string(84) " " @@ -46,7 +46,7 @@ string(5) "World" string(85) " " ===COMMIT=== -bool(true) +bool(false) string(5) "Hello" string(5) "World" string(85) " diff --git a/ext/phar/tests/tar/phar_begin_setstub_commitU.phpt b/ext/phar/tests/tar/phar_begin_setstub_commitU.phpt index 06b2bed37d..d058b36165 100644 --- a/ext/phar/tests/tar/phar_begin_setstub_commitU.phpt +++ b/ext/phar/tests/tar/phar_begin_setstub_commitU.phpt @@ -37,8 +37,8 @@ unlink(dirname(__FILE__) . '/brandnewphar.phar.tar'); ?> --EXPECT-- bool(true) -bool(true) bool(false) +bool(true) unicode(5) "Hello" string(84) " " @@ -46,7 +46,7 @@ unicode(5) "World" string(85) " " ===COMMIT=== -bool(true) +bool(false) unicode(5) "Hello" unicode(5) "World" string(85) " diff --git a/ext/phar/tests/zip/phar_begin_setstub_commit.phpt b/ext/phar/tests/zip/phar_begin_setstub_commit.phpt index e0f14cc36d..dc59f2f3aa 100755 --- a/ext/phar/tests/zip/phar_begin_setstub_commit.phpt +++ b/ext/phar/tests/zip/phar_begin_setstub_commit.phpt @@ -50,8 +50,8 @@ unlink(dirname(__FILE__) . '/myfakestub.php'); ?> --EXPECT-- bool(true) -bool(true) bool(false) +bool(true) string(5) "Hello" string(84) " " @@ -59,7 +59,7 @@ string(5) "World" string(85) " " ===COMMIT=== -bool(true) +bool(false) string(5) "Hello" string(5) "World" string(85) " diff --git a/ext/phar/tests/zip/phar_begin_setstub_commitU.phpt b/ext/phar/tests/zip/phar_begin_setstub_commitU.phpt index 43a140f9ad..2956fc6f4a 100644 --- a/ext/phar/tests/zip/phar_begin_setstub_commitU.phpt +++ b/ext/phar/tests/zip/phar_begin_setstub_commitU.phpt @@ -50,8 +50,8 @@ unlink(dirname(__FILE__) . '/myfakestub.php'); ?> --EXPECT-- bool(true) -bool(true) bool(false) +bool(true) unicode(5) "Hello" string(84) " " @@ -59,7 +59,7 @@ unicode(5) "World" string(85) " " ===COMMIT=== -bool(true) +bool(false) unicode(5) "Hello" unicode(5) "World" string(85) "