WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 12 days ago

#43194 closed defect (bug) (worksforme)

MySQL error when uploading my own theme

Reported by: JavierCasares Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.9.2
Component: Themes Keywords: reporter-feedback close
Focuses: Cc:

Description

NOTE: I have the debug options ON

When I upload my own theme [Themes -> Add New -> Upload Theme] I get these mesages:

Installing Theme from uploaded file: example-1.2.3.zip
Unpacking the package…
Installing the theme…
Theme installed successfully.
Network Enable | Return to Themes page

Notice: wpdb::prepare was called incorrectly. Unsupported value type (array). Please see Debugging in WordPress for more information. (This message was added in version 4.8.2.) in /wp-includes/functions.php on line 4147

Warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in /wp-includes/wp-db.php on line 1102

Notice: wpdb::prepare was called incorrectly. Unsupported value type (array). Please see Debugging in WordPress for more information. (This message was added in version 4.8.2.) in /wp-includes/functions.php on line 4147

Warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in /wp-includes/wp-db.php on line 1102

Change History (3)

#1 @swissspidy
3 years ago

  • Keywords reporter-feedback added

Hey there

This sounds like a faulty plugin that uses wpdb::prepare() incorrectly. Try disabling all plugins and using a default theme like Twenty Seventeen to see if the error still happens. If not, you can activate the plugins again one by one to find the cause of the issue.

#2 @hellofromTonya
6 weeks ago

  • Keywords close added

Hello @JavierCasares,

It does seem to be a plugin, theme, or 3rd party script that's causing the issue.

What happened when you deactivated all the plugins and switched to a default theme (like Twenty Seventeen)? Did the PHP notices and warnings go away? Please advise.

I'm marking this ticket as a close worksforme candidate. Please don't be alarmed. We mark tickets for close consideration when we are unable to reproduce and suspect the problem is not due to WordPress core. However, when more information is given, we reevaluate.

#3 @hellofromTonya
12 days ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

I'm closing this ticket. However, if the problem persists, please reopen and provide more information to help us further investigate.

Note: See TracTickets for help on using tickets.