Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119119 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 65250 invoked from network); 13 Dec 2022 13:52:33 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 13 Dec 2022 13:52:33 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D87D7180506 for ; Tue, 13 Dec 2022 05:52:32 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 13 Dec 2022 05:52:32 -0800 (PST) Received: by mail-wm1-f54.google.com with SMTP id o5-20020a05600c510500b003d21f02fbaaso1125190wms.4 for ; Tue, 13 Dec 2022 05:52:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=cjLw9NUvs/qtGdwvApCQMGQ+EJ1L8DcqGJvhylVkd3s=; b=m66rE0Sb7Dt9dqPH056CYeJvB9XPSMbLSIz6uxhLYRiPTjPwrNQcnc5k5zkyoGWJUZ RR/7BV8c8Vdv3ZJmrbAsxpNMF3TMviGgcJiAEYZ9MgS0JA5Epi+1vYp7Q15taxUYHi2f kpZUmTEDj+CyQvP13r/QYiMx1kDe2ew7ViPW03JZsR1/OMTRFW0nkcyyEU/5JiqdQIhB xp8wfqqqtmBVnhabOI0vP9NWXjmBL3oRAw/31sY6NV/ha+65VRmO5ZFXv0rzUrzNaBdb +csGIAve6L1zfzeMHbuNZgFdEe43o/b+DbF8Jz01W8jSYLQGU9DwBavg+GO0W0goSpHV vywQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cjLw9NUvs/qtGdwvApCQMGQ+EJ1L8DcqGJvhylVkd3s=; b=oOdHhEKh2DpuEZznSpR/LxbW0EBGmGqEsGq/z2qUWQ/P4MuLD6srvishVrTP7WrNDH b6FVb1UdQtBHWfH/Spcnfi6yQb7tAtmN9ENwiJZ9c5B448Tw3mB0avW/EBxTNKcPtpzS algObFmwjP0EwEWe4sz8nw1Snx9qtWgrugdeMaMIDkr6DWwr1BKWnXb6UFKgw9D4xvXm IHyRDQpPTWGmbGZ42DJdIEY3kXorQRj7d60iII5jf/iRiAaQapZwJpLsnP7M0Rbsp+90 RDjUOW+YdcadHwZepxiipo9qn5X3MFOl2z8ItnIgzXX+cYYOpFxW2kHnkN+15gOURuI2 Po7w== X-Gm-Message-State: ANoB5pkwxogT7/KznXNFZCniKlUHi1ckT6BbiES4Rp3YJtoUVtzvH3kX 46Mjl9H8knVwq5UJw70BMxUGAoUEpgc= X-Google-Smtp-Source: AA0mqf4iu2sYTw1s3LEfmTyesbN14W+ufLsMIn9nBqMH7QRgsHtLy7Jfvibc69PcDZzPIOI/AfLCaA== X-Received: by 2002:a05:600c:35cd:b0:3cf:973e:c874 with SMTP id r13-20020a05600c35cd00b003cf973ec874mr15571167wmq.14.1670939551065; Tue, 13 Dec 2022 05:52:31 -0800 (PST) Received: from [192.168.0.22] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.googlemail.com with ESMTPSA id o3-20020a05600c510300b003cfa3a12660sm3018089wms.1.2022.12.13.05.52.30 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Dec 2022 05:52:30 -0800 (PST) Message-ID: Date: Tue, 13 Dec 2022 13:52:31 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Content-Language: en-GB To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Revisiting RFC: Engine Warnings -- Undefined array index From: rowan.collins@gmail.com (Rowan Tommins) On 13/12/2022 12:53, Dan Liebner wrote: > It breaks my app. Does that count? The only way a Warning can break an application is if you're running a custom handler which promotes it to an error. If that is your case, then blaming PHP is a little bit like programming your car to do an emergency stop at every road sign, then complaining to the highways agency when someone runs into the back of you. On the other hand, in keeping with my earlier suggestion of making valid use cases easy, PHP could help by making it easier to filter messages in that callback. At the moment, you'd have to match the content of the message, which is not ideal; a unique code for each message type would be much nicer, but there's potentially quite a lot of initial work to assign codes to all the existing messages. That way, you could promote some warnings to errors, and ignore others; or log them with your own choice of severity, possibly not even limiting yourself to those that PHP provides. Of course, this won't help in the long run for things which eventually do become errors, but for everything below that level, it would be much more powerful than a one-off setting to change the severity of one specific message. Regards, -- Rowan Tommins [IMSoP]