# Feature proposal

- Thread: https://externals.io/message/3562
- Original archive: https://news-web.php.net/php.internals/3562
- Started by Wojtek Meler on 2003-07-22T17:48:11+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

---

## #3562 — Wojtek Meler — 2003-07-22T17:48:11+00:00

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

I have to fight with people that using error suppression operator - they 
just hide their bugs.
I wrote simple patch that allows set disable_error_suppression=On in 
php.ini that causes engine to ignore '@' operators.

http://strony.wp.pl/wp/wmeler/error_suppression.patch.txt

Regards,
Wojtek

---

## #3563 — Mike Robinson — 2003-07-22T18:04:42+00:00

URL: https://externals.io/message/3562#3563 · In reply to: #3562

No offense, but I see this feature as a bad thing in so many ways
and on so many levels my skin is crawling. :)


Regards

Mike Robinson
http://fiddy8.com/


> I have to fight with people that using error suppression operator - they 
> just hide their bugs.
> I wrote simple patch that allows set disable_error_suppression=On in 
> php.ini that causes engine to ignore '@' operators.
> 
> http://strony.wp.pl/wp/wmeler/error_suppression.patch.txt
> 
> Regards,
> Wojtek

---

## #3570 — Timm Friebe — 2003-07-22T22:34:10+00:00

URL: https://externals.io/message/3562#3570 · In reply to: #3562

> I have to fight with people that using error suppression operator - they 
> just hide their bugs.
> I wrote simple patch that allows set disable_error_suppression=On in 
> php.ini that causes engine to ignore '@' operators.

Use `set_error_handler()`, then; the callback function is called
regardless whether the error suppression "operator" @ was used.

thekid@friebes:~ > php -r 'function handler() {
var_dump(array_pop(array_slice($a= `func_get_args()`, 1, 1))); }
set_error_handler("handler"); @include("foo");'
                              ^^^^^^^^^^^^^^^

string(64) "Unknown(foo): failed to create stream: No such file or
directory"
string(116) "Unknown(): Failed opening 'foo' for inclusion
(include_path='.:/home/thekid/devel/xp/skeleton:/home/thekid/classes')"

- Timm

---

## #3573 — Wojtek Meler — 2003-07-23T08:04:56+00:00

URL: https://externals.io/message/3562#3573 · In reply to: #3570

Timm Friebe wrote:
> 
> 
> > […]
> 
> 
> Use `set_error_handler()`, then; the callback function is called
> regardless whether the error suppression "operator" @ was used.
> 
> thekid@friebes:~ > php -r 'function handler() {
> var_dump(array_pop(array_slice($a= `func_get_args()`, 1, 1))); }
> set_error_handler("handler"); @include("foo");'
>                               ^^^^^^^^^^^^^^^
> 
> string(64) "Unknown(foo): failed to create stream: No such file or
> directory"
> string(116) "Unknown(): Failed opening 'foo' for inclusion
> (include_path='.:/home/thekid/devel/xp/skeleton:/home/thekid/classes')"
> 
> - Timm
> 
> 
but try this :

php -r 'function handler() { var_dump(array_pop(array_slice($a= 
 `func_get_args()`, 1, 1))); }  set_error_handler("handler"); 
@nonexist();echo "and now what?";'

regards
Wojtek

---

## #3700 — Cristiano Duarte — 2003-08-03T03:47:15+00:00

URL: https://externals.io/message/3562#3700 · In reply to: #3573

Sorry, but didn't all there error/warnings/info got logged if you want ? I
think you can set loggin on in php.ini and IMHO that's the best place to dig
for bugs...

Cristiano Duarte.

"Wojtek Meler" <wmeler@wp-sa.pl> escreveu na mensagem
news:3F1E41A8.6040106@wp-sa.pl...
> Timm Friebe wrote:
> > […]
> but try this :
>
> php -r 'function handler() { var_dump(array_pop(array_slice($a=
> `func_get_args()`, 1, 1))); }  set_error_handler("handler");
> @nonexist();echo "and now what?";'
>
> regards
> Wojtek
