Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104266 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 47967 invoked from network); 7 Feb 2019 04:26:20 -0000 Received: from unknown (HELO mail-ua1-f53.google.com) (209.85.222.53) by pb1.pair.com with SMTP; 7 Feb 2019 04:26:20 -0000 Received: by mail-ua1-f53.google.com with SMTP id t8so2966195uap.0 for ; Wed, 06 Feb 2019 17:07:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2m4QrztyxCbxKrwKOTg0luwOBlWt54FIGevWY2QM9U0=; b=SDX3ELapAL+/AlpFbDooP5wpSvg4gSqQ+UhsIwKPdW/B7PUTLPMScoRQ1gm7XW4RKY LZo6pOWTNOol2xDP6bq5MAaJlxPFF2WOgzi4Fw2EcLUvkj8hmZz9Vaitm/1YspStoFPs tDhyjADsUyiFJ1eTxYsit6TceFa3V7kplz0dhRLF34fa9LDbThmwA0p2XT4Pgij/KDF7 +QZp6Vl9tqTvMxc1L08AUKqNh7FBEqPbsHkKtmFp+JnENrgfULcKpezKfGn+fjRRwaZn RuHj9WVXT+uj3EthlsOUaaCKTHD63bZtmqwuIddOi/HYton5NmLSFO3mT2d8JaNOwrF/ i/3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2m4QrztyxCbxKrwKOTg0luwOBlWt54FIGevWY2QM9U0=; b=L9edI+5X1ChAi652MuoTPj8fwCVaBA296+8NEwvv488Y/zGn/Oln5f3eFPiPXRY0Pl RhSPbKzIcJw0qEwtbzfOynnmzT650ndrSeZKibpSBLeT5DE6mA47EpboCj1qSbV/AfWu vnwczCIrEFoeSVWt0i9rxLavPbL+kPYnjSQg24L+OxNZM4hxeqiEsU6R0E7RGZxxbND6 n/A08nBWMe9OgJXi+kqLLpQRW1p3svO24f1Uvej+CJQQ1PVWzPnSl0fnrJnLov9Pmyqu tFskM2zc9TONubLsVf35wTYKt2c5IWktSobaxH+1Vs4b3dpqp4UOGck/F2HOtX/ne4IC enOg== X-Gm-Message-State: AHQUAuYqftr4+IELaIs+/qIA08yawFnc3yd1gVLlFEn2Ph5I6qAtd4GQ ac+xfIS8AaV+9GAozZch8ZujCgISsKV01fFCtsc= X-Google-Smtp-Source: AHgI3IYIlSPPy+KxNZH62G3CfMvb7PWF52NZA70Rl7QcJEjJBioAvAm5d28hH1sKLtXbNTGOdb9ZdGLc2Mu7USsdAfY= X-Received: by 2002:ab0:16c8:: with SMTP id g8mr5100995uaf.60.1549501670668; Wed, 06 Feb 2019 17:07:50 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 7 Feb 2019 02:07:37 +0100 Message-ID: To: Pierre Joye Cc: Nikita Popov , PHP internals Content-Type: multipart/alternative; boundary="000000000000a8c10505814378f8" Subject: Re: [PHP-DEV] Don't silence fatal errors From: george.banyard@gmail.com (Girgias) --000000000000a8c10505814378f8 Content-Type: text/plain; charset="UTF-8" On Thu, 7 Feb 2019 at 02:03, Pierre Joye wrote: > Good morning Nikita, > > On Tue, Nov 27, 2018, 4:43 AM Nikita Popov > > Hi internals, > > > > When the silencing operator @ is used, the intention is generally to > > silence expected warnings or notices. However, it currently also silences > > fatal errors. As fatal errors also abort request execution, the result > will > > often be a hard to debug white screen of death. > > > > The most recent occurrence which motivated me to write this mail is > > https://bugs.php.net/bug.php?id=77205, but I've seen this play out > > multiple > > times already. > > > > I would like to propose to change the behavior of @ to only silence > > warnings, notices and other low-level diagnostics, but leave fatal errors > > intake. In particular, the following should not be silenced: > > > > > I am surely missing use cases because I wonder why we need @, at all? > > Yes there are functions generating extra messages and should not, be fro. > PHP implementation or from external libraries (wrapping stderr to php > errors). All of them could be fixed. > > Best, > Pierre > The most common case which comes to mind is to suppress erros while file reading. Because even if you check a file exists it could be deleted inbetween the check and the read command. As you can see this is even written in the documentation [1] Best regards George Peter Banyard [1] https://secure.php.net/manual/en/function.fopen.php --000000000000a8c10505814378f8--