• This is the warning after activating simple history today.

    Warning: sprintf(): Too few arguments in C:\xampp\htdocs\Ben Zwart\wp-content\plugins\simple-history\inc\SimpleHistory.php on line 1363

    Warning: sprintf(): Too few arguments in C:\xampp\htdocs\Ben Zwart\wp-content\plugins\simple-history\inc\SimpleHistory.php on line 1373

    The line starting with “wp_enqueue_script” is line 1363
    The php lines look like this:

    // Only enqueue if locale-file exists on file system
    if ( file_exists( sprintf( $locale_dir_path, $locale ) ) ) {
    wp_enqueue_script( ‘timeago-locale’, sprintf( $locale_url_path, $locale ), array(“jquery”), ‘1.5.2’, true );
    } else {
    wp_enqueue_script( ‘timeago-locale’, sprintf( $locale_url_path, “en” ), array(“jquery”), ‘1.5.2’, true );
    }
    // end add timeago

    // Load Select2 locale
    $locale_url_path = SIMPLE_HISTORY_DIR_URL . ‘js/select2/select2_locale_%s.js’;
    $locale_dir_path = SIMPLE_HISTORY_PATH . ‘js/select2/select2_locale_%s.js’;
    if ( file_exists( sprintf( $locale_dir_path, $locale ) ) ) {
    wp_enqueue_script( ‘select2-locale’, sprintf( $locale_url_path, $locale ), array(“jquery”), ‘3.5.1’, true );
    }

    More info:
    My name: Ben Zwart
    My Dashboard in WP: https://localhost/Ben%20Zwart/wp-admin/index.php
    Windows 8, XAMPP v3.2.2, Apache server, MySQL database

    • This topic was modified 7 years, 9 months ago by benzwart.
Viewing 1 replies (of 1 total)
  • Plugin Author eskapism

    (@eskapism)

    Do you have any other plugins installed or anything else that may modify the locale or language settings?

Viewing 1 replies (of 1 total)
  • The topic ‘sprintf() too few arguments’ is closed to new replies.