X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FTitle.php;h=d5eff4610501e365510eb94411b2aedf9f5b63e3;hb=67a20b6e434b0cd3e2d3b3555f14ae096e4e4132;hp=509fc27d694ebdcf39297e1cd9bd0a93f512e8be;hpb=c32888c284a688716e4f4440789f20517d83d2d9;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Title.php b/includes/Title.php index 509fc27d69..d5eff46105 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -265,6 +265,7 @@ class Title { if ( is_object( $text ) ) { throw new InvalidArgumentException( '$text must be a string.' ); } elseif ( !is_string( $text ) ) { + wfDebugLog( 'T76305', wfGetAllCallers( 5 ) ); wfWarn( __METHOD__ . ': $text must be a string. This will throw an InvalidArgumentException in future.', 2 ); } @@ -3308,6 +3309,14 @@ class Title { $this->mIsBigDeletion = null; } + public static function clearCaches() { + $linkCache = LinkCache::singleton(); + $linkCache->clear(); + + $titleCache = self::getTitleCache(); + $titleCache->clear(); + } + /** * Capitalize a text string for a title if it belongs to a namespace that capitalizes *