This repository was archived by the owner on Jun 2, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ const expectedFailures = [
45
45
'Tests_Menu_Walker_Nav_Menu::test_start_el_with_empty_attributes with data set #6' ,
46
46
'Tests_Menu_Walker_Nav_Menu::test_start_el_with_empty_attributes with data set #7' ,
47
47
'Tests_Menu_wpNavMenu::test_wp_nav_menu_should_not_have_has_children_class_with_custom_depth' ,
48
+ 'WP_Test_REST_Posts_Controller::test_get_items_orderby_modified_query' ,
48
49
] ;
49
50
50
51
console . log ( 'Running WordPress PHPUnit tests with expected failures tracking...' ) ;
Original file line number Diff line number Diff line change @@ -3165,6 +3165,20 @@ private function cast_value_in_non_strict_mode(
3165
3165
case 'datetime ' :
3166
3166
case 'timestamp ' :
3167
3167
case 'year ' :
3168
+ /*
3169
+ * MySQL supports date and time components without a zero padding,
3170
+ * but that doesn't work with date and time functions in SQLite.
3171
+ * E.g.: "2025-3-7 9:5:2" is a valid datetime/timestamp value in
3172
+ * in MySQL, but SQLite requires it to be "2025-03-07 09:05:02".
3173
+ *
3174
+ * A solution to this would need to be done on the SQL level to
3175
+ * address computed values, and it should be done for the strict
3176
+ * mode as well. This may require a user-defined function.
3177
+ *
3178
+ * TODO: Handle zero padding for date and time functions, while
3179
+ * supporting both strict and non-strict modes.
3180
+ */
3181
+
3168
3182
if ( 'date ' === $ mysql_data_type ) {
3169
3183
$ function_call = sprintf ( 'DATE(%s) ' , $ translated_value );
3170
3184
} elseif ( 'time ' === $ mysql_data_type ) {
You can’t perform that action at this time.
0 commit comments