PHP Notice: Function wpdb::prepare was called incorrectly.
-
Hi,
This is seen during a fresh install
When installing this plugin with debug.log enabled, it triggers a notice
[05-Mar-2024 14:40:42 UTC] PHP Notice: Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.) in [path]\wp-includes\functions.php on line 6031Additional digging seems to point to
[path]\wp-content\plugins\classified-listing\app\Database\Migrations\Forms.php
Line 39 onwards
// Create new form if table is empty if ( $wpdb->get_var( "SHOW TABLES LIKE '$table'" ) ) { $row = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) from $table" ) ); if ( ! $row ) { $formData = FormPreDefined::sample(); Form::query()->insert( $formData ); } } } }Please check and guide.
Thanks
The topic ‘PHP Notice: Function wpdb::prepare was called incorrectly.’ is closed to new replies.