When using HandlerFactory::classFromRequest($request), this causes all handlers to check canBeUsedForRequest, thus newing up each handler. When we get to ContentRangeUploadHandler, the $contentRange would be null if we were not intending to use that handler for any case. Passing null as the subject to preg_match is deprecated.
Simple fix is to utilize the second argument for header and pass empty string as default.
When using
HandlerFactory::classFromRequest($request)
, this causes all handlers to checkcanBeUsedForRequest
, thus newing up each handler. When we get toContentRangeUploadHandler
, the$contentRange
would benull
if we were not intending to use that handler for any case. Passingnull
as the subject topreg_match
is deprecated.Simple fix is to utilize the second argument for
header
and pass empty string as default.