Loading...
홈 › 블로그

IT 개발 블로그 — REDINFO

PHP Fatal error: Uncaught ValueError: strtotime(): Argument #1 ($time) cannot contain null - 타입 체크 실패 완벽 해결

PHP 8.1 이상에서 strtotime() 함수를 쓸 때 갑자기 'Uncaught ValueError' 에러가 터진 경험이 있을까? 아마 PHP 7.x에서는 멀쩡하던 코드인데도 업그레이드 후 서비스가 먹통이 되는 상황을 겪었을 수도 있다. 문제는 PHP 8.0부터 null 값 처리가 엄격해졌다는 것. 이번에는 strtotime()이 null을 받을 때 왜···

0 0
REDINFO Since 2014
webmaster@redinfo.co.kr
Copyright © Redinfo All Rights Reserved