-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
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.
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(); |
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.
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') ?: ''; |
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.
Nejsem si jist, ze toto v php 5.3 projde.
Ano, to mám ověřené, |
Ale projde i kdyz tam neni promenna? Podminka ? true : false; Projde, ale
myslim ze s timto je v 5.3 problem:
Podminka ? true;
Podminka ? : false;
Dne po 3. zář 2018 6:35 uživatel Jakub Bouček <[email protected]>
napsal:
… Ano, to mám ověřené, short ternary je od 5.3:
https://secure.php.net/manual/en/language.operators.comparison.php#language.operators.comparison.ternary
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ATtKn34jJp5rCKYjrbTI0uNNzEM2_dojks5uXLGZgaJpZM4WW3hZ>
.
|
Ano :) Ternary operator je: conditions ? true : false` Short ternary operator je právě to zkrácené: conditions ?: false` |
Opravy zjevných chyb
BC break: Ne