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).
This commit is contained in:
Mikael Nordfeldth 2015-01-18 12:52:33 +01:00
parent d492b74e42
commit 06c93faa2d
1 changed files with 1 additions and 1 deletions

View File

@ -1170,7 +1170,7 @@ class Action extends HTMLOutputter // lawsuit
$link = sprintf('<a class="license" rel="external license" href="%1$s">%2$s</a>',
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');