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

[tags] If we count false it returns 1 and not zero #16143

Closed
wants to merge 1 commit into from

Conversation

zero-24
Copy link
Contributor

@zero-24 zero-24 commented May 20, 2017

Pull Request for Issue #14747

Summary of Changes

$var = count(false) => 1 see: http://php.net/manual/en/function.count.php

@tonypartridge please check this too as this comes from #14747

Testing Instructions

  • enable maximal error reporting
  • add one article
  • add one tag to a article
  • access the article from the frontend
  • get the URL for the list of the tagged articles
  • untag the tag from the article
  • see the error in the frontend Notice: Trying to get property of non-object in JRoot\components\com_tags\views\tag\view.html.php on line 120

Expected result

No error just the No matching items were found. message

Actual result

The No matching items were found. plus a PHP notice: Notice: Trying to get property of non-object in JRoot\components\com_tags\views\tag\view.html.php on line 120

Documentation Changes Required

none

@Melvine9
Copy link

Thank you very much zero-24 . It's perfect ;-)

@wojsmol
Copy link
Contributor

wojsmol commented May 20, 2017

@Melvine9 If you tested this PR plese mark yuir test result on https://issues.joomla.org/tracker/joomla-cms/16143

@PhilETaylor

This comment was marked as abuse.

@PhilETaylor

This comment was marked as abuse.

@Melvine9
Copy link

I have tested this item ✅ successfully on 679c010

Tested
PHP 7.1.5
The notice php fixed


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16143.

@Quy
Copy link
Contributor

Quy commented May 20, 2017

@zero-24 This a duplicate #16077. Plus this pr will not execute the code inside this test when there is 1 item.

@zero-24
Copy link
Contributor Author

zero-24 commented May 20, 2017

Thanks @Quy closing than.

@zero-24 zero-24 closed this May 20, 2017
@zero-24 zero-24 deleted the tags branch May 20, 2017 19:24
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

6 participants