# Fix for #39018 (suppressing error messages)

- Thread: https://externals.io/message/35937
- Original archive: https://news-web.php.net/php.internals/35937
- Started by Felipe Pena on 2008-03-04T01:26:58+00:00
- Messages: 4
- 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

---

## #35937 — Felipe Pena — 2008-03-04T01:26:58+00:00

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

Hello developers,

I made a patch for the bug#39018:

$x = 'test';
@$x[4] == 'a';
(@$x[4]) == 'a';
(@($x[4])) == 'a';
@($x[4]) == 'a';
$foo = 'test'; $x = @$foo[6];

Actually, all cases above shows E_NOTICE.
With the patch, `E_NOTICE` is not showed.

Patches:
[5.3]  http://felipe.ath.cx/diff/bug39018.diff
[HEAD] http://felipe.ath.cx/diff/bug39018-HEAD.diff



However, this patch breaks one test in Zend/tests/, because of an
E_NOTICE:

--TEST--
Bug #39304 (Segmentation fault with list unpacking of string offset)
--FILE--
<?php 
  $s = "";
  list($a, $b) = $s[0];
?>
--EXPECTF--
Fatal error: Cannot use string offset as an array in %sbug39304.php on
line 3

Diff:
001+ Notice: Uninitialized string offset: 0 ...



Would be this a problem? Looks right to me...

Finally, any objection?


Tests for the this fix:
- http://felipe.ath.cx/diff/bug39018.phpt
- http://felipe.ath.cx/diff/bug39018_2.phpt



Thanks.

-- 
Regards,
Felipe Pena.

---

## #36048 — Felipe Pena — 2008-03-07T15:43:27+00:00

URL: https://externals.io/message/35937#36048 · In reply to: #35937

Hello,

no reply means "no! don't touch." ?


Thanks.

2008/3/3, Felipe Pena <felipensp@gmail.com>:
> Hello developers,
>
>  I made a patch for the bug#39018:
>
>  $x = 'test';
>  @$x[4] == 'a';
>  (@$x[4]) == 'a';
>  (@($x[4])) == 'a';
>  @($x[4]) == 'a';
>  $foo = 'test'; $x = @$foo[6];
>
>  Actually, all cases above shows E_NOTICE.
>  With the patch, `E_NOTICE` is not showed.
>
>  Patches:
>  [5.3]  http://felipe.ath.cx/diff/bug39018.diff
>  [HEAD] http://felipe.ath.cx/diff/bug39018-HEAD.diff
>
>
>
>  However, this patch breaks one test in Zend/tests/, because of an
>  E_NOTICE:
>
>  --TEST--
>  Bug #39304 (Segmentation fault with list unpacking of string offset)
>  --FILE--
>  <?php
>   $s = "";
>   list($a, $b) = $s[0];
>  ?>
>  --EXPECTF--
>  Fatal error: Cannot use string offset as an array in %sbug39304.php on
>  line 3
>
>  Diff:
>  001+ Notice: Uninitialized string offset: 0 ...
>
>
>
>  Would be this a problem? Looks right to me...
>
>  Finally, any objection?
>
>
>  Tests for the this fix:
>  - http://felipe.ath.cx/diff/bug39018.phpt
>  - http://felipe.ath.cx/diff/bug39018_2.phpt
>
>
>
>  Thanks.
>
>  --
>  Regards,
>
> Felipe Pena.

---

## #36049 — Jani Taskinen — 2008-03-07T16:02:14+00:00

URL: https://externals.io/message/35937#36049 · In reply to: #36048

It means "You didn't commit, nobody cares."
Read: Just commit..that'll wake them up. ;)

--Jani



> Hello,
> 
> no reply means "no! don't touch." ?
> 
> 
> Thanks.
> 
> 2008/3/3, Felipe Pena <felipensp@gmail.com>:
> > […]
> 
-- 
Patches/Donations: http://pecl.php.net/~jani/

---

## #36052 — Stanislav Malyshev — 2008-03-07T20:47:41+00:00

URL: https://externals.io/message/35937#36052 · In reply to: #36048

Hi!

> no reply means "no! don't touch." ?

Usually it means "doesn't look bad enough to cry out right now, need 
time to figure it out" :)
-- 
Stanislav Malyshev, Zend Software Architect
stas@zend.com   http://www.zend.com/
(408)253-8829   MSN: stas@zend.com
