Skip to content
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

Merged
merged 2 commits into from
Mar 3, 2017
Merged

clean up helpers #1407

merged 2 commits into from
Mar 3, 2017

Conversation

aschweigert
Copy link

No description provided.

inc/helpers.php Outdated
}
return $output;

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?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

d'oh, one sec

@rclations rclations merged commit ea6341b into WPBuddy:master Mar 3, 2017
@rclations
Copy link

👍 many thanks

}
function largo_get_current_url() {
$url = $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
return ( ! empty( is_ssl() ) ) ? 'https://' . $url : 'http://' . $url;
Copy link
Collaborator

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

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?

Copy link
Collaborator

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?

Copy link
Collaborator

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

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

@benlk benlk mentioned this pull request Mar 15, 2017
1 task
benlk added a commit that referenced this pull request Mar 15, 2017
rclations added a commit that referenced this pull request Aug 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants