cloudinary / cloudinary_wordpress

Cloudinary's WordPress plugin
GNU General Public License v2.0
39 stars 28 forks source link

fix: prevent php warning in looks_like_json function #970

Closed epigeyre closed 2 weeks ago

epigeyre commented 3 weeks ago

If $thing only contains a space it will generate a php warning when doing ltrim( $thing )[0]. This fixes the issue while still being compatible with php 5.4+.

Fixes issue #933