jenkins-bot has submitted this change and it was merged. Change subject: Title: Restrict debug log size by using wfGetAllCallers(5) ......................................................................
Title: Restrict debug log size by using wfGetAllCallers(5) Follows-up f45a334edb. Similar to what we do in MessageCache and RequestContext. The unrestricted debug_backtrace dump was causing: > Title.php: PHP Fatal: String length exceeded 2^31-2: 2147483647 Bug: T95811 Change-Id: Ifa5af3a5e807b050e649b8180776151b827dc737 --- M includes/Title.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Title.php b/includes/Title.php index be1b638..61ce9c0 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -264,7 +264,7 @@ throw new InvalidArgumentException( '$text must be a string.' ); } elseif ( !is_string( $text ) ) { wfWarn( __METHOD__ . ': $text must be a string. This will throw an InvalidArgumentException in future.' ); - wfDebugLog( 'AdHocDebug', 'Title::newFromText non-string at ' . json_encode( debug_backtrace() ) ); + wfDebugLog( 'AdHocDebug', 'Title::newFromText non-string at ' . wfGetAllCallers( 5 ) ); } $cache = self::getTitleCache(); -- To view, visit https://gerrit.wikimedia.org/r/203392 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifa5af3a5e807b050e649b8180776151b827dc737 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.26wmf1 Gerrit-Owner: Krinkle <krinklem...@gmail.com> Gerrit-Reviewer: Krinkle <krinklem...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits