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

Check page status if page exists. #535

Merged
merged 1 commit into from
Jun 21, 2018
Merged

Check page status if page exists. #535

merged 1 commit into from
Jun 21, 2018

Conversation

Fisiu
Copy link
Contributor

@Fisiu Fisiu commented May 13, 2018

Signed-off-by: Mariusz Fik mariusz@fidano.pl

@nWidart
Copy link
Member

nWidart commented May 15, 2018

Why is this needed?

@Fisiu
Copy link
Contributor Author

Fisiu commented May 15, 2018

I page is not found we should return 404, no need to check it's staus. We should check status only if page exists.

@nWidart
Copy link
Member

nWidart commented May 15, 2018

This was already done, you just split it in 2 ifs, so why? :D
A better solution might be to inverse the condition order.

is_null($page) || $page->status == 0

@huydang284
Copy link
Contributor

I agree with @nWidart.

It should be is_null($page) || $page->status == 0

Signed-off-by: Mariusz Fik <mariusz@fidano.pl>
@Fisiu
Copy link
Contributor Author

Fisiu commented Jun 8, 2018

It took me a while to get back to work on asgardcms. Here is expected implementation.

@nWidart
Copy link
Member

nWidart commented Jun 21, 2018

Thanks!

@nWidart nWidart merged commit efa7c32 into AsgardCms:3.0 Jun 21, 2018
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.

3 participants