-
-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clean up helpers #1407
clean up helpers #1407
Conversation
inc/helpers.php
Outdated
} | ||
return $output; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you want to return $output
right after you echo'd it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d'oh, one sec
👍 many thanks |
} | ||
function largo_get_current_url() { | ||
$url = $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; | ||
return ( ! empty( is_ssl() ) ) ? 'https://' . $url : 'http://' . $url; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line causes a fatal syntax error: https://travis-ci.org/INN/Largo/jobs/207500636#L220
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe the empty() should be removed, since is_ssl return boolean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This particular problem is only a problem in PHP < 5.5: https://stackoverflow.com/questions/1075534/cant-use-method-return-value-in-write-context#4328049
Do we want to keep PHP 5.3 support?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same commit on PHP 5.5 has a failed test that we've seen before: https://travis-ci.org/INN/Largo/jobs/207500651#L261
Largo issue for that test: #1404
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WP supports PHP 5.2.4+ and MySQL 5.0+, so we should too
No description provided.