From: Aryeh Gregor Date: Mon, 6 Aug 2018 17:33:35 +0000 (+0300) Subject: Fix incorrect method name X-Git-Tag: 1.34.0-rc.0~4539^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=a49a6376be76f074eeed57ca16fd1c48074a5668;p=lhc%2Fweb%2Fwiklou.git Fix incorrect method name getTimestamp() returns the timestamp of the revision, and as far as I can tell that's null here, presumably because we haven't saved the content and thus there is no revision. getCacheTime() returns the time when the page was parsed, which is probably what we want. Change-Id: I7dc446800656236f6ecc872a65e620881e434c54 --- diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php index e8318c2d3e..a3e3e575e7 100644 --- a/includes/api/ApiStashEdit.php +++ b/includes/api/ApiStashEdit.php @@ -401,7 +401,7 @@ class ApiStashEdit extends ApiBase { ) { // If an item is renewed, mind the cache TTL determined by config and parser functions. // Put an upper limit on the TTL for sanity to avoid extreme template/file staleness. - $since = time() - wfTimestamp( TS_UNIX, $parserOutput->getTimestamp() ); + $since = time() - wfTimestamp( TS_UNIX, $parserOutput->getCacheTime() ); $ttl = min( $parserOutput->getCacheExpiry() - $since, self::MAX_CACHE_TTL ); // Avoid extremely stale user signature timestamps (T84843)