]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
PHP BUG??? Cannot figure out why this throws warning
authorMikael Nordfeldth <mmn@hethane.se>
Sun, 18 Jan 2015 11:52:33 +0000 (12:52 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Sun, 18 Jan 2015 11:52:33 +0000 (12:52 +0100)
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

index fb71d3073fac1f1afd34c6b6fd242efb844082c3..7c57cbc432a9e8ba7f911bca38652ddbf3b39e6b 100644 (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');