From 06c93faa2d3f66bbe5edb5f2ba33d454bd1fce19 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Sun, 18 Jan 2015 12:52:33 +0100 Subject: [PATCH] PHP BUG??? Cannot figure out why this throws warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I kept getting this on "Quitter EspaƱa" (which seems to be the name causing the commotion, as it's part of this sprintf algorithm): PHP Warning: sprintf(): Argument number must be greater than zero in /srv/www/vhosts/quitter.es/%/htdocs/lib/action.php on line 1175 I'll just make it quiet for now so it doesn't spam other sites with UTF-8 characters in their name (if that's what's causing this). --- lib/action.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/action.php b/lib/action.php index fb71d3073f..7c57cbc432 100644 --- a/lib/action.php +++ b/lib/action.php @@ -1170,7 +1170,7 @@ class Action extends HTMLOutputter // lawsuit $link = sprintf('%2$s', htmlspecialchars(common_config('license', 'url')), htmlspecialchars(common_config('license', 'title'))); - $this->raw(sprintf(htmlspecialchars($notice), + $this->raw(@sprintf(htmlspecialchars($notice), htmlspecialchars(common_config('site', 'name')), $link)); $this->elementEnd('p');