Skip to content

sprintf(): Too few arguments in (...)/thesography/exifography.php #6

Open

Description

@acseven

Hi,

Using PHP 7.3 (I guess anything above 7), I was getting a lot of warnings from line 385:

PHP Warning: sprintf(): Too few arguments in /home/mydomain/public_html/wpan/wp-content/plugins/thesography/exifography.php on line 385

The offending line reads:

$output[$key] = sprintf(stripslashes($options['before_item']),$key) . $value . stripslashes($options['sep']) . $exif . stripslashes($options['after_item']);

Which I've changed to the following in order to surpress the warnings:

$output[$key] = sprintf(stripslashes($options['before_item']),$key,"") . $value . stripslashes($options['sep']) . $exif . stripslashes($options['after_item']);

Cheers

Activity

  1. airdrummer commented on Aug 4, 2022

    @airdrummer

    looks like u have added another parameter in your before_item option...the default is
    <li class="%s"> where the class is set to the exif property...
    to avoid errors if there is a discrepancy between args & formats, i have coded
    @sprintf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions