Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110719 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 51148 invoked from network); 24 Jun 2020 21:09:34 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 24 Jun 2020 21:09:34 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0415E180507 for ; Wed, 24 Jun 2020 12:57:02 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 24 Jun 2020 12:57:01 -0700 (PDT) Received: by mail-lj1-f174.google.com with SMTP id s9so3912788ljm.11 for ; Wed, 24 Jun 2020 12:57:01 -0700 (PDT) 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; bh=tsrZ4TMW7H15ELvolWABAvmqcARqwqbQkwXOAypEP0w=; b=L86cePEQ1PyqnQJbeLRLzIvLSlQUp2P4fJjiDvSmLQbtI4dlhcoQj/3tVLJysfZ/D1 gDv356giQ5otPI1xXZfantuPAmvkkaRyR1yT3Ev26mtZVl4ig2z3Nm2AW7T3jF9tyE2E +cuw2BN9hfWYUnua0l4GejzvN+m0EypVXmWbBDcLjH6A6ekKWYbQkc0aXYekdmJnAVYD Fa/vmAzpfxfI88eh4aiaDwdrRlp8S6y9KUzPEHRo5E9aSC9WalYxESqMvDhtW2rmK6tm 4GXZi+2KygWS6vtLZI1jCegT+8HwKXabI8B/5MhoR4puQF8p3k/n4CAMNcYXRFbAYuDk fR6A== 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; bh=tsrZ4TMW7H15ELvolWABAvmqcARqwqbQkwXOAypEP0w=; b=C6499z4VVkJRCwRvxrv3bdqgJzFrFH/Barn2ItKjCs+Vw6zlaZmKDtNQrBhPIvdGeq JnWL2K0j/MsvkeAK4dXlFt/QRksNcD7eaJD9bFhYsgL/Nt2zkSvtUnmJQ/R7D69pY4jf y6vHmZsR3RfBk6KnjrpuasgJEvDyVFPJRWDQkTXJZ0EehhpO8Ou/s+6ydHj161O8hiCh PnkWwTlXc7Dx6siJkVq6kx9okT4TfdiF0NkVCXh+P820pGkZjnYOlyuku1CdLPf3TkH7 mKCxPRMfG1h5MG6y8CTbUQ5yFxMc0xObgNAoHzY5xNv0axtTUGtROWIWTtoqe3zTD13c nMhA== X-Gm-Message-State: AOAM530WToZ4g2w3MWI5UDLmJzFOW8BoOBlDFR35SHE5ThM7IV1FGI28 2eNfC9tXYMq9XdlIecP26jgngFJcEiwL09d/GOiRY06f X-Google-Smtp-Source: ABdhPJx5Q4uyPlmnMRsWwRIhAvDoMHuCQ696c+VEwzoiiZl2M4chxd+6kbyY1blrj5XbWzu5lIj5uTuo2ubRjn6F1yo= X-Received: by 2002:a05:651c:119a:: with SMTP id w26mr144591ljo.126.1593028617251; Wed, 24 Jun 2020 12:56:57 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 24 Jun 2020 21:56:42 +0200 Message-ID: To: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: [PHP-DEV] Making the hardcoded string length limit of Throwable->getTraceAsString() configurable From: alexinbeijing@gmail.com (Alex) On Wed, Jun 24, 2020 at 9:22 PM tyson andre wrote: > > By default, strings in parameter lists are truncated to 15 bytes by default in Throwable->getTraceAsString() > (and Throwable->__toString() as a consequence). > (in Zend/zend_exception.c in `static void _build_trace_args(zval *arg, smart_str *str)`) > > This limit is too short to see relevant information such as file paths, full urls, etc, which makes reporting bugs in applications inconvenient. > > Would there be any interest in an ini setting such as `exception_string_length_limit` as a non-negative value to raise this (either allowed to be 0 or more or 15 or more, defaulting to 15) Just as a suggestion, might it not be simpler just to increase the limit to something a bit higher than 15? (Personally, I view the growth of things like .INI parameters with suspicion. I feel each one should really "carry its weight". But if this one does, that is fine.) Alex