Changeset 59040 for trunk/src/wp-includes/rest-api.php
- Timestamp:
- 09/17/2024 11:22:43 PM (21 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/rest-api.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api.php
r58933 r59040 1305 1305 * Parses an RFC3339 time into a Unix timestamp. 1306 1306 * 1307 * Explicitly check for `false` to detect failure, as zero is a valid return 1308 * value on success. 1309 * 1307 1310 * @since 4.4.0 1308 1311 * … … 1370 1373 $date = rest_parse_date( $date ); 1371 1374 1372 if ( empty( $date )) {1375 if ( false === $date ) { 1373 1376 return null; 1374 1377 } … … 2260 2263 2261 2264 case 'date-time': 2262 if ( !rest_parse_date( $value ) ) {2265 if ( false === rest_parse_date( $value ) ) { 2263 2266 return new WP_Error( 'rest_invalid_date', __( 'Invalid date.' ) ); 2264 2267 }
Note: See TracChangeset
for help on using the changeset viewer.