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

Opravy drobných chyb #6

Merged
merged 5 commits into from
Sep 3, 2018
Merged

Opravy drobných chyb #6

merged 5 commits into from
Sep 3, 2018

Conversation

jakubboucek
Copy link
Member

Opravy zjevných chyb

BC break: Ne

@jakubboucek jakubboucek self-assigned this Sep 3, 2018
Copy link
Member

@Dosty85 Dosty85 left a comment

Choose a reason for hiding this comment

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

Jen kouknout na ty php 5.3 "?:" syntaxe. Jinak ok.

@@ -37,7 +37,7 @@ function check_access(){
if($post_groups && !$this->user_can_view_post() && !is_home() && !is_front_page()){
$no_access_url = $this->get_no_access_redirect_url();

$url = $no_access_url ? $no_access_url : site_url();
$url = $no_access_url ?: site_url();
Copy link
Member

Choose a reason for hiding this comment

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

Nejsem si jist, ze toto v php 5.3 projde.

@@ -98,7 +99,7 @@ public function create_item($request){

// Set the membership valid_to param
$membership = new SSC_Membership($user_id);
$valid_to = $request->get_param('valid_to') ? $request->get_param('valid_to') : '';
$valid_to = $request->get_param('valid_to') ?: '';
Copy link
Member

Choose a reason for hiding this comment

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

Nejsem si jist, ze toto v php 5.3 projde.

@jakubboucek
Copy link
Member Author

@Vyfakturuj-cz
Copy link

Vyfakturuj-cz commented Sep 3, 2018 via email

@jakubboucek
Copy link
Member Author

Ano :)

Ternary operator je:

conditions ? true : false`

Short ternary operator je právě to zkrácené:

conditions ?: false`

@jakubboucek jakubboucek merged commit 9f95351 into master Sep 3, 2018
jakubboucek added a commit that referenced this pull request Sep 3, 2018
@jakubboucek jakubboucek deleted the fixes branch September 3, 2018 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants