WordPress.org

Make WordPress Core

Changeset 509 in tests


Ignore:
Timestamp:
02/01/12 22:48:03 (2 years ago)
Author:
convissor
Message:

Break up string so PHP does not think $cat[termid] is an array. (PHP 5.3 let it slide, 5.4 does not.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_query_results.php

    r366 r509  
    153153    function test_query_cat() { 
    154154        $cat = category_exists('cat-b'); 
    155         $posts = $this->q->query("cat={$cat[term_id]}"); 
     155        // Break up string so PHP does not think $cat[termid] is an array here. 
     156        $posts = $this->q->query("cat={".$cat."[term_id]}"); 
    156157 
    157158        // there are 4 posts with Cat B 
Note: See TracChangeset for help on using the changeset viewer.