{"action":"opened","issue":{"url":"https://api.github.com/repos/nextcloud/files_fulltextsearch/issues/15","repository_url":"https://api.github.com/repos/nextcloud/files_fulltextsearch","labels_url":"https://api.github.com/repos/nextcloud/files_fulltextsearch/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/nextcloud/files_fulltextsearch/issues/15/comments","events_url":"https://api.github.com/repos/nextcloud/files_fulltextsearch/issues/15/events","html_url":"https://github.com/nextcloud/files_fulltextsearch/issues/15","id":328103229,"node_id":"MDU6SXNzdWUzMjgxMDMyMjk=","number":15,"title":"[0.7.2] Warnings in ConfigService.php","user":{"login":"patschi","id":2029878,"node_id":"MDQ6VXNlcjIwMjk4Nzg=","avatar_url":"https://avatars1.githubusercontent.com/u/2029878?v=4","gravatar_id":"","url":"https://api.github.com/users/patschi","html_url":"https://github.com/patschi","followers_url":"https://api.github.com/users/patschi/followers","following_url":"https://api.github.com/users/patschi/following{/other_user}","gists_url":"https://api.github.com/users/patschi/gists{/gist_id}","starred_url":"https://api.github.com/users/patschi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patschi/subscriptions","organizations_url":"https://api.github.com/users/patschi/orgs","repos_url":"https://api.github.com/users/patschi/repos","events_url":"https://api.github.com/users/patschi/events{/privacy}","received_events_url":"https://api.github.com/users/patschi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-31T11:36:44Z","updated_at":"2018-05-31T11:36:44Z","closed_at":null,"author_association":"MEMBER","body":"When performing a manual index of my files using\r\n```\r\nsudo -u www-data /usr/bin/php /var/www/nextcloud/occ fulltextsearch:index\r\n```\r\na couple of PHP warnings are shown in the nextcloud log. These are follows:\r\n\r\nLevel | App | Message | Time\r\n-- | -- | -- | --\r\nError | PHP | Invalid argument supplied for foreach() at /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/ConfigService.php#260 | 2018-05-31T13:12:07+0200\r\nError | PHP | array_keys() expects parameter 1 to be array, null given at /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/ConfigService.php#259 | 2018-05-31T13:12:07+0200\r\n\r\nThey are caused in the function `compareIndexOptions()`, see [lib/Service/ConfigService.php#L252](https://github.com/nextcloud/files_fulltextsearch/blob/master/lib/Service/ConfigService.php#L252).\r\n\r\nI would suggest adding/adapting following in the mentioned function:\r\n```php\r\nif (!is_array($options) || count($options) === 0) {\r\n\treturn false;\r\n}\r\n```\r\n\r\nAs I'm not fimiliar with the app structure enough I rather opened a ticket than a pull request, as I'm not aware of possible side effects that might cause or if they might be better solutions."}}
{"actor":{"display_login":"patschi"}}