File tree 4 files changed +11
-51
lines changed
4 files changed +11
-51
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ PHP NEWS
17
17
. Fixed bug GH-9285 (Traits cannot be used in readonly classes).
18
18
(kocsismate)
19
19
20
+ - Date:
21
+ . Fixed bug GH-9431 (DateTime::getLastErrors() not returning false when no
22
+ errors/warnings). (Derick)
23
+
20
24
- Opcache:
21
25
. Fixed bug GH-9371 (Crash with JIT on mac arm64)
22
26
(jdp1024/David Carlier)
Original file line number Diff line number Diff line change @@ -2269,7 +2269,11 @@ static void update_errors_warnings(timelib_error_container *last_errors) /* {{{
2269
2269
timelib_error_container_dtor (DATEG (last_errors ));
2270
2270
DATEG (last_errors ) = NULL ;
2271
2271
}
2272
- DATEG (last_errors ) = last_errors ;
2272
+ if (last_errors -> warning_count || last_errors -> error_count ) {
2273
+ DATEG (last_errors ) = last_errors ;
2274
+ } else {
2275
+ timelib_error_container_dtor (last_errors );
2276
+ }
2273
2277
} /* }}} */
2274
2278
2275
2279
static void php_date_set_time_fraction (timelib_time * time , int microseconds )
Original file line number Diff line number Diff line change @@ -105,18 +105,7 @@ object(DateTime)#%d (3) {
105
105
["timezone"]=>
106
106
string(%d) "%s"
107
107
}
108
- array(4) {
109
- ["warning_count"]=>
110
- int(0)
111
- ["warnings"]=>
112
- array(0) {
113
- }
114
- ["error_count"]=>
115
- int(0)
116
- ["errors"]=>
117
- array(0) {
118
- }
119
- }
108
+ bool(false)
120
109
121
110
122
111
string(7) "Y-m-d +"
@@ -148,15 +137,4 @@ object(DateTime)#%d (3) {
148
137
["timezone"]=>
149
138
string(%d) "%s"
150
139
}
151
- array(4) {
152
- ["warning_count"]=>
153
- int(0)
154
- ["warnings"]=>
155
- array(0) {
156
- }
157
- ["error_count"]=>
158
- int(0)
159
- ["errors"]=>
160
- array(0) {
161
- }
162
- }
140
+ bool(false)
Original file line number Diff line number Diff line change @@ -113,37 +113,11 @@ DateTime Object
113
113
[timezone_type] => 3
114
114
[timezone] => UTC
115
115
)
116
- Array
117
- (
118
- [warning_count] => 0
119
- [warnings] => Array
120
- (
121
- )
122
-
123
- [error_count] => 0
124
- [errors] => Array
125
- (
126
- )
127
-
128
- )
129
116
==
130
117
DateTime Object
131
118
(
132
119
[date] => 2004-06-08 00:00:00.000000
133
120
[timezone_type] => 3
134
121
[timezone] => UTC
135
122
)
136
- Array
137
- (
138
- [warning_count] => 0
139
- [warnings] => Array
140
- (
141
- )
142
-
143
- [error_count] => 0
144
- [errors] => Array
145
- (
146
- )
147
-
148
- )
149
123
==
You can’t perform that action at this time.
0 commit comments