From: Mikael Nordfeldth Date: Sun, 18 Jan 2015 11:52:33 +0000 (+0100) Subject: PHP BUG??? Cannot figure out why this throws warning X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=06c93faa2d3f66bbe5edb5f2ba33d454bd1fce19;p=quix0rs-gnu-social.git PHP BUG??? Cannot figure out why this throws warning 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). --- 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');