Changeset 54530
- Timestamp:
- 10/17/2022 11:47:41 AM (22 months ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-date-query.php
r54133 r54530 151 151 } 152 152 153 if ( isset( $date_query['relation'] ) && 'OR' === strtoupper( $date_query['relation'] )) {154 $this->relation = 'OR';153 if ( isset( $date_query['relation'] ) ) { 154 $this->relation = ; 155 155 } else { 156 156 $this->relation = 'AND'; … … 220 220 $this->validate_date_values( $queries ); 221 221 } 222 223 224 222 225 223 226 foreach ( $queries as $key => $q ) { … … 1042 1045 return $wpdb->prepare( "DATE_FORMAT( $column, %s ) $compare %f", $format, $time ); 1043 1046 } 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1044 1063 } -
trunk/tests/phpunit/tests/date/query.php
r54217 r54530 1146 1146 $this->assertSame( array( $p1, $p2 ), $q->posts ); 1147 1147 } 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1148 1286 } -
trunk/tests/phpunit/tests/term/taxQuery.php
r54402 r54530 336 336 /** 337 337 * @ticket 18105 338 338 339 */ 339 340 public function test_get_sql_relation_and_operator_in() { … … 382 383 $this->assertSame( 3, substr_count( $sql['join'], 'JOIN' ) ); 383 384 385 386 387 388 389 384 390 _unregister_taxonomy( 'wptests_tax' ); 385 391 } … … 387 393 /** 388 394 * @ticket 18105 395 389 396 */ 390 397 public function test_get_sql_nested_relation_or_operator_in() { … … 435 442 436 443 $this->assertSame( 2, substr_count( $sql['join'], 'JOIN' ) ); 444 445 437 446 438 447 _unregister_taxonomy( 'wptests_tax' ); … … 496 505 _unregister_taxonomy( 'wptests_tax' ); 497 506 } 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 498 563 }
Note: See TracChangeset
for help on using the changeset viewer.