From d7f50ac2c41f6a5932bb02bdcd965529c0884a2e Mon Sep 17 00:00:00 2001 From: Greg Beaver Date: Fri, 13 Nov 2009 00:58:11 +0000 Subject: [PATCH] fix PHP Bug #49938: Phar::isBuffering() returns inverted value --- NEWS | 1 + ext/phar/phar_object.c | 2 +- ext/phar/tests/phar_begin_setstub_commit.phpt | 4 ++-- ext/phar/tests/phar_begin_setstub_commitU.phpt | 4 ++-- ext/phar/tests/tar/phar_begin_setstub_commit.phpt | 4 ++-- ext/phar/tests/tar/phar_begin_setstub_commitU.phpt | 4 ++-- ext/phar/tests/zip/phar_begin_setstub_commit.phpt | 4 ++-- ext/phar/tests/zip/phar_begin_setstub_commitU.phpt | 4 ++-- 8 files changed, 14 insertions(+), 13 deletions(-) diff --git a/NEWS b/NEWS index 0d9da50c8f..799ce75728 100644 --- a/NEWS +++ b/NEWS @@ -33,6 +33,7 @@ PHP NEWS (Jani) - Fixed bug #49985 (pdo_pgsql prepare() re-use previous aborted transaction). (ben dot pineau at gmail dot com, Ilia, Matteo) +- Fixed bug #49938 (Phar::isBuffering() returns inverted value). (Greg) - Fixed bug #49921 (Curl post upload functions changed). (Ilia) - Fixed bug #49910 (no support for ././@LongLink for long filenames in phar tar support). (Greg) 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) " -- 2.49.0