Code change for associateAttachmentsWithContent

Status
This content is read-only, or is not open for further replies.

tenants

Guest
offline
A minor change, I've seen this method is a bit unsafe to extend/override, it's easy to pass in an empty $tempHash
Doing so will update every attachment in the database (that's not going to be easy to reverse)

can we add a check on the tempHash on this method, something like:

Code:

if(!$tempHash){throw new \InvalidArgumentException("No hash provided for attachment");}

I cant see a reason why you would ever need to pass in an empty $tempHash
Other than some silly addon developer making a...

Read more

Continue reading...
 
Liked by:
Status
This content is read-only, or is not open for further replies.
Top Bottom