Please keep in mind that PHP 5.5 is end of life.
A better fix:
$url = esc_url( $url );
if ( empty( $url ) ) {
Since the issue is actually this:
Prior to PHP 5.5, empty() only supports variables; anything else will result in a parse error. In other words, the following will not work: empty(trim($name)). Instead, use trim($name) == false.
That said, please do upgrade PHP as soon as possible for your own security and safety 🙂
Edit: I will make that more back-compatible in 4.0.2 though.
Like many enterprise operations that require stability over bleeding-edge features, we run CentOS 6.x, which adheres to the Red Hat Security Backporting policy: https://access.redhat.com/security/updates/backporting
For this reason, we won’t be upgrading PHP anytime soon, nor are we at any risk of security problems. 🙂
In fact, I heard recently that something like 15% of all WordPress installations are still at 5.3 or below. (Shocking, I know.)
So, however you do it, probably good to include this minor fix in the next release, since we are almost certainly not the only ones experiencing this issue.