Error in plugin: Argument number specifier must be greater then 0
-
I’m writing to report an error that I encountered while using the “Location Weather” plugin. When I try to access customizer page, I get the following error message:
“Fatal error: Uncaught ValueError: Argument number specifier must be greater than zero and less than 2147483647 in /home/xxx/www/wp-content/plugins/location-weather/includes/Admin/LW_Widget.php:88”
Upon investigating the code, I found that the issue is with the following line:
echo sprintf( ‘<p>%1$s <a href=”‘ . esc_url( admin_url( ‘post-new.php?post_type=location_weather’ ) ) . ‘”>%$s</a> %3$s</p>’, esc_html__( ‘You did not generate any weather yet.’, ‘location-weather’ ), esc_html__( ‘click here’, ‘location-weather’ ), esc_html__( ‘to generate a new location weather now.’, ‘location-weather’ ) );
It appears that the second argument in the sprintf function should be “%2$s” instead of “%$s”. The error message states that the argument number specifier must be greater than zero and less than 2147483647, which suggests that this is the issue.
I kindly request that you take a look at this issue and provide a fixed plugin version. Please let me know if you require any further information from me.
Thank you for your attention to this matter.
- The topic ‘Error in plugin: Argument number specifier must be greater then 0’ is closed to new replies.