# test bug60322

- Thread: https://externals.io/message/67700
- Original archive: https://news-web.php.net/php.internals/67700
- Started by Pierre Joye on 2013-06-13T06:23:47+00:00
- Messages: 5
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #67700 — Pierre Joye — 2013-06-13T06:23:47+00:00

URL: https://externals.io/message/67700#67700

hi Stas,

tests/output/bug60322.phpt - var_dump(ob_get_clean());  prints
string(0) "" instead of bool(false);
5.3/4/5 recent builds

Is the test wrong or the fix?

Cheers,
--
Pierre

@pierrejoye | http://www.libgd.org

---

## #67701 — Stas Malyshev — 2013-06-13T08:37:38+00:00

URL: https://externals.io/message/67700#67701 · In reply to: #67700

Hi!

> tests/output/bug60322.phpt - var_dump(ob_get_clean());  prints
> string(0) "" instead of bool(false);
> 5.3/4/5 recent builds

Produces false for me. As it should be.

-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

---

## #67702 — Pierre Joye — 2013-06-13T10:16:54+00:00

URL: https://externals.io/message/67700#67702 · In reply to: #67701

> Hi!
>
> > […]
>
> Produces false for me. As it should be.

'works for me' is barely an answer ;-)

Fails on 5 boxes here.

What's your settings?

--
Pierre

@pierrejoye | http://www.libgd.org

---

## #67704 — Stas Malyshev — 2013-06-13T17:24:17+00:00

URL: https://externals.io/message/67700#67704 · In reply to: #67702

Hi!

> Fails on 5 boxes here.
> 
> What's your settings?

It would be much more useful to know what is *your* settings, since it
is where the tests are failing. But never mind, I think I know where the
problem is. The loop in the test:

while(ob_get_clean());

is wrong, since it would terminate at first empty buffer. So if you have
multiple output buffers stacked (not sure how to create it with INI
alone, maybe some extensions do that?) the buffers will not be cleaned
properly by the time it gets to the var_dump, and thus the test would
work wrong. I'll try to simulate this situation and rewrite the test.
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

---

## #67705 — Pierre Joye — 2013-06-13T18:08:55+00:00

URL: https://externals.io/message/67700#67705 · In reply to: #67704

> Hi!
>
> > […]
>
> It would be much more useful to know what is *your* settings, since it
> is where the tests are failing. But never mind, I think I know where the
> problem is.

Yes, but I have to wait until the rest of the team wake up to get the
detailed settings and planed to post them here  :)

> The loop in the test:
>
> while(ob_get_clean());
>
> is wrong, since it would terminate at first empty buffer. So if you have
> multiple output buffers stacked (not sure how to create it with INI
> alone, maybe some extensions do that?) the buffers will not be cleaned
> properly by the time it gets to the var_dump, and thus the test would
> work wrong. I'll try to simulate this situation and rewrite the test.

Thanks! I will ask to run that test again and see if your commit fixes it.

Cheers,
-- 
Pierre

@pierrejoye | http://www.libgd.org
