stream icon indicating copy to clipboard operation
stream copied to clipboard

Fixup fc606db

Open lkraav opened this issue 3 years ago • 0 comments
trafficstars

This reverts commit fc606dbd175b1ce533ea88198f8bf91a78fb1439.

We found a more correct location to improve a previously existing sanity check.

Fixes #1080, but better. Sorry @kasparsd :smile:

You were right, there was a connection between #1038 and #1080 all along. I now traced down how all meta is added to a record, and found we're already trying to prevent empty values. Unfortunately

  • existing $stream_meta is_null() check alone is weak
  • $user_meta being a nested array, its actual contents isn't checked at all

strlen trick seems to be a solid one, considering hundreds of upvotes on PHP docs. I always disliked having to do a separate empty string check for is_scalar() result.

Now that previous version is in, this PR doesn't have urgency for its own release.

lkraav avatar Mar 09 '22 13:03 lkraav