wordpress sprintf PHP error

I’m getting this error:

Warning: sprintf() [function.sprintf]: Too few arguments in
/home/xxxxxxxx/public_html/wp-content/plugins/surveys/wpframe.php on
line 53

Read More

the code reads…

if(!function_exists('t')) {
/// Globalization function - Returns the transilated string
function t($message) {
    $args = func_get_args();
    return __(call_user_func_array('sprintf', $args), $GLOBALS['wpframe_plugin_name']);
}
}

Any idea what’s wrong?

Related posts

Leave a Reply

1 comment

  1. sprintf requires at least 2 arguments: A format string, and a list of values to insert into that format string. e.g

    sprintf('This is a %d decimal and this is a %s string', 42, 'xxx');
    

    2 format characters, so requires 2 values to fill in. For every format character in the format string, you must have a matching value specified.

    What’s in your $args variable at the point you receive the error?