WordPress.org

Ready to get started?Download WordPress

Forums

CPT-onomies: Using Custom Post Types as Taxonomies
[resolved] Error in WP 3.5 (13 posts)

  1. ronbme
    Member
    Posted 1 year ago #

    This is in WP 3.5. (Not MultiSite)

    Gives the following error:
    Missing argument 2 for wpdb::prepare(), called in \wp-content\plugins\cpt-onomies\cpt_onomy.php on line 260 and defined in \wp-includes\wp-db.php on line 990

    Looks like it is missing a second argument.

    I'm working with another plugin author. Same thing. Everything is fine in WP 3.4.2 but getting errors in WP 3.5.

    Let me know if you need more info.

    Ron

    http://wordpress.org/extend/plugins/cpt-onomies/

  2. ronbme
    Member
    Posted 1 year ago #

    Rachel, this should help:

    Changeset 22429
    Timestamp:
    11/07/12 19:30:59 (3 weeks ago)
    Author:
    nacin
    Message:

    Enforce a minimum of two arguments for wpdb::prepare(). The first argument is the query (or fragment thereof), which is required. Additional arguments are values to substitute into placeholders.

    This will generate E_WARNINGs for insufficient arguments when prepare() is called with no additional arguments. This should discourage improper uses of prepare() under the guise of safely running a query.

    props xknown. fixes #22262.

    It looks like they are forcing wpdb to have a second argument.

    Ron

  3. Rachel Carden
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks Ron!! I'll get it all fixed up for the next update.

  4. Rachel Carden
    Member
    Plugin Author

    Posted 1 year ago #

    I've got this all fixed for the next update! Thanks for the heads up!

  5. ronbme
    Member
    Posted 1 year ago #

    Great! Thanks Rachel!

    I'm looking forward to it.

    Ron

  6. Brayne
    Member
    Posted 1 year ago #

    Wouldn't it be easy to simply add some code to line 990 in wp-db.php?

    function prepare( $query, $args) {

    Becomes

    function prepare( $query, $args = "" ) {

  7. pserafini
    Member
    Posted 1 year ago #

    Hi there.
    First things first, thanks for the nice plugin !

    Now, WP 3.5 has gone public and I need a fix as the update to wp-db broke quite a bunch of functionalities of my current project.

    Do you plan to release the update anytime soon ?

    Cheers !

    p.

  8. Rachel Carden
    Member
    Plugin Author

    Posted 1 year ago #

    I hope to push out the update tomorrow!

  9. pserafini
    Member
    Posted 1 year ago #

    That would be perfect !

    Thanks for the quick answer ! Keep up the good work !

  10. groupewibi
    Member
    Posted 1 year ago #

    Thank u Rachel !

    I going to make a fix quick in waiting the update tomorow.

    B Regards,

  11. rossebow
    Member
    Posted 1 year ago #

    I'm also getting the error on line 1348 of cpt_onomy.php.

    You can just add ", NULL" to the end of the wpdb::prepare() statement.

    Ross

  12. Rachel Carden
    Member
    Plugin Author

    Posted 1 year ago #

    CPT-onomies 1.2 is out and should take care of this. Thanks!

  13. pserafini
    Member
    Posted 1 year ago #

    thanks !

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.