@@ -201,10 +201,6 @@ public function errorHandler(int $severity, string $message, ?string $file = nul
201201 return true ;
202202 }
203203
204- if ($ this ->isImplicitNullableDeprecationError ($ message , $ file , $ line )) {
205- return true ;
206- }
207-
208204 if (! $ this ->config ->logDeprecations || (bool ) env ('CODEIGNITER_SCREAM_DEPRECATIONS ' )) {
209205 throw new ErrorException ($ message , 0 , $ severity , $ file , $ line );
210206 }
@@ -245,38 +241,6 @@ private function isSessionSidDeprecationError(string $message, ?string $file = n
245241 return false ;
246242 }
247243
248- /**
249- * Workaround to implicit nullable deprecation errors in PHP 8.4.
250- *
251- * "Implicitly marking parameter $xxx as nullable is deprecated,
252- * the explicit nullable type must be used instead"
253- *
254- * @TODO remove this before v4.6.0 release
255- */
256- private function isImplicitNullableDeprecationError (string $ message , ?string $ file = null , ?int $ line = null ): bool
257- {
258- if (
259- PHP_VERSION_ID >= 80400
260- && str_contains ($ message , 'the explicit nullable type must be used instead ' )
261- // Only Kint and Faker, which cause this error, are logged.
262- && (str_starts_with ($ message , 'Kint \\' ) || str_starts_with ($ message , 'Faker \\' ))
263- ) {
264- log_message (
265- LogLevel::WARNING ,
266- '[DEPRECATED] {message} in {errFile} on line {errLine}. ' ,
267- [
268- 'message ' => $ message ,
269- 'errFile ' => clean_path ($ file ?? '' ),
270- 'errLine ' => $ line ?? 0 ,
271- ],
272- );
273-
274- return true ;
275- }
276-
277- return false ;
278- }
279-
280244 /**
281245 * Checks to see if any errors have happened during shutdown that
282246 * need to be caught and handle them.
0 commit comments