{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/23172","repository_url":"https://api.github.com/repos/joomla/joomla-cms","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/23172/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/23172/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/23172/events","html_url":"https://github.com/joomla/joomla-cms/issues/23172","id":384219128,"node_id":"MDU6SXNzdWUzODQyMTkxMjg=","number":23172,"title":"Weblinks categories: Warning: count(): Parameter must be an array or an object that implements Countable","user":{"login":"toivo","id":1175079,"node_id":"MDQ6VXNlcjExNzUwNzk=","avatar_url":"https://avatars1.githubusercontent.com/u/1175079?v=4","gravatar_id":"","url":"https://api.github.com/users/toivo","html_url":"https://github.com/toivo","followers_url":"https://api.github.com/users/toivo/followers","following_url":"https://api.github.com/users/toivo/following{/other_user}","gists_url":"https://api.github.com/users/toivo/gists{/gist_id}","starred_url":"https://api.github.com/users/toivo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toivo/subscriptions","organizations_url":"https://api.github.com/users/toivo/orgs","repos_url":"https://api.github.com/users/toivo/repos","events_url":"https://api.github.com/users/toivo/events{/privacy}","received_events_url":"https://api.github.com/users/toivo/received_events","type":"User","site_admin":false},"labels":[{"id":138443932,"node_id":"MDU6TGFiZWwxMzg0NDM5MzI=","url":"https://api.github.com/repos/joomla/joomla-cms/labels/No%20Code%20Attached%20Yet","name":"No Code Attached Yet","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-11-26T08:22:20Z","updated_at":"2018-11-26T10:43:52Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"### Steps to reproduce the issue\r\n1. Install Weblinks 3.6.0 Package from https://extensions.joomla.org/extensions/extension/official-extensions/weblinks/ on Joomla 3.9.0 using PHP 7.2 and set to report PHP warnings.\r\n2. Go to Components - Web Links and add any URL as New Web Link to the existing category Uncategorised with default options, Save & Close.\r\n3. Create a new menu item and select Web Links - List All Web Link Categories with default options, Save & Close.\r\n4. Go to the front end and select the new link.\r\n\r\n\r\n### Expected result\r\nThe list shows the category Uncategorised.\r\n\r\n### Actual result\r\nWarning: count(): Parameter must be an array or an object that implements Countable in C:\\www\\joomla380\\components\\com_weblinks\\models\\categories.php on line 95\r\n\r\nThe list shows the category Uncategorised.\r\n\r\n\r\n### System information (as much as possible)\r\nJoomla 3.9.0\r\nPHP 7.2.11\r\n\r\n\r\n### Additional comments\r\nFixed by inserting the following lines before line 95 in \r\ncomponents/com_weblinks/models/categories.php\r\n\r\n\t\tif (!is_array($this->_items))\r\n\t\t{\r\n\t\t\t$this->_items\t= array();\r\n\t\t}\r\n\r\nRef. topic \"Weblinks Categories page - Warning: count() at https://forum.joomla.org/viewtopic.php?f=715&t=967481\r\n"},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/441595333","html_url":"https://github.com/joomla/joomla-cms/issues/23172#issuecomment-441595333","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/23172","id":441595333,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MTU5NTMzMw==","user":{"login":"toivo","id":1175079,"node_id":"MDQ6VXNlcjExNzUwNzk=","avatar_url":"https://avatars1.githubusercontent.com/u/1175079?v=4","gravatar_id":"","url":"https://api.github.com/users/toivo","html_url":"https://github.com/toivo","followers_url":"https://api.github.com/users/toivo/followers","following_url":"https://api.github.com/users/toivo/following{/other_user}","gists_url":"https://api.github.com/users/toivo/gists{/gist_id}","starred_url":"https://api.github.com/users/toivo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toivo/subscriptions","organizations_url":"https://api.github.com/users/toivo/orgs","repos_url":"https://api.github.com/users/toivo/repos","events_url":"https://api.github.com/users/toivo/events{/privacy}","received_events_url":"https://api.github.com/users/toivo/received_events","type":"User","site_admin":false},"created_at":"2018-11-26T10:43:52Z","updated_at":"2018-11-26T10:43:52Z","author_association":"CONTRIBUTOR","body":"I do not know about 3.9.1-rc but I have now reproduced the warning in an out-of-the-box Joomla 3.9.0 updated with Joomla_3.9.1-dev-Development-Update_Package.zip.\n\nAlso in the code available from https://github.com/joomla-extensions/weblinks the file models/categories.php is identical to version 3.6.0.\n\n <hr /><sub>This comment was created with the <a href=\"https://github.com/joomla/jissues\">J!Tracker Application</a> at <a href=\"https://issues.joomla.org/tracker/joomla-cms/23172\">issues.joomla.org/tracker/joomla-cms/23172</a>.</sub>"}}
{"actor":{"display_login":"toivo"}}