WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/05/2019 05:42:57 AM (2 years ago)
Author:
pento
Message:

Coding Standards: Fix all WordPress.DB.PreparedSQLPlaceholders issues.

See #47632.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/db.php

    r44272 r45603  
    16131613        $part = $wpdb->prepare( ' AND meta_value = %s', ' %s ' );
    16141614        $this->assertNotContains( '%s', $part );
     1615        // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber
    16151616        $query = $wpdb->prepare( 'SELECT * FROM {$wpdb->postmeta} WHERE meta_key = %s $part', array( 'foo', 'bar' ) );
    16161617        $this->assertNull( $query );
     
    16211622
    16221623        $actual = $wpdb->prepare(
     1624            // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.UnquotedComplexPlaceholder
    16231625            'WHERE second=%2$f AND first=%1$f',
    16241626            1.1,
     
    16351637
    16361638        $actual = $wpdb->prepare(
     1639            // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.UnquotedComplexPlaceholder
    16371640            'WHERE second=%2$f AND first=%1$f',
    16381641            array( 1.1, 2.2 )
Note: See TracChangeset for help on using the changeset viewer.