boonebgorges / buddypress-docs

GNU General Public License v3.0
106 stars 44 forks source link

Save return of bp_get_option locally before calling empty() #633

Closed matthewf-ucsd closed 6 years ago

matthewf-ucsd commented 6 years ago

PHP 5.5 added the functionality to use empty() directly on the return values of functions. Eliminating that by saving the return value to a local variable before calling empty() restores compatibility with PHP 5.3 and 5.4, which are still officially supported by Buddypress and Wordpress.

boonebgorges commented 6 years ago

Thanks, @matthewf-ucsd. I bet you're getting sick of sending these PRs. My sympathies :-D and sorry for the oversight.

matthewf-ucsd commented 6 years ago

Hah, it's only been two so far :) Thank you for all you do on the Commons-in-a-Box project!

dcavins commented 6 years ago

Sorry about that. That was totally my fault--I've become php5 blind. :)