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

[com_content] /components/com_content/views/form/view.html.php contains unneeded check #16409

Closed
nvyush opened this issue Jun 1, 2017 · 6 comments

Comments

@nvyush
Copy link
Contributor

nvyush commented Jun 1, 2017

Steps to reproduce the issue

Code review of the file /components/com_content/views/form/view.html.php, lines 49 — 77.

Expected result

if (!empty($this->item->id))

Actual result

if (!empty($this->item) && isset($this->item->id))

System information (as much as possible)

Joomla 3.7.2

Additional comments

The check !empty($this->item) is unneeded or must be above. E.g., this check is absent at the line 53.
I think, it is possible to join the statements of if conditions at the lines 72 and 77.

@Bakual
Copy link
Contributor

Bakual commented Jun 1, 2017

Since you already propose some code, can you please create a Pull Request so it can be tested?
https://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests

@nvyush
Copy link
Contributor Author

nvyush commented Jun 1, 2017

Bakual
I have some trouble with this now.

@Bakual
Copy link
Contributor

Bakual commented Jun 1, 2017

I can try to help if you tell me what the trouble is 😄

@nvyush
Copy link
Contributor Author

nvyush commented Jun 1, 2017

I use online github. My fork is inconsistent. I can't create second fork and I don't want to drop my fork.

@Bakual
Copy link
Contributor

Bakual commented Jun 1, 2017

If you edit the file on this repo instead of your fork, then GitHub will automatically create a new branch in your fork based on this repo here.

@nvyush
Copy link
Contributor Author

nvyush commented Jun 1, 2017

Closed as we have PR #16412.
Thanks, Bakual.

@nvyush nvyush closed this as completed Jun 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants