{"action":"created","issue":{"url":"https://api.github.com/repos/phalcon/cphalcon/issues/10346","labels_url":"https://api.github.com/repos/phalcon/cphalcon/issues/10346/labels{/name}","comments_url":"https://api.github.com/repos/phalcon/cphalcon/issues/10346/comments","events_url":"https://api.github.com/repos/phalcon/cphalcon/issues/10346/events","html_url":"https://github.com/phalcon/cphalcon/issues/10346","id":76267008,"number":10346,"title":"\\Phalcon\\Annotations\\Reader crashs php if annotation does not contain any php doc type","user":{"login":"DasRed","id":2239808,"avatar_url":"https://avatars.githubusercontent.com/u/2239808?v=3","gravatar_id":"","url":"https://api.github.com/users/DasRed","html_url":"https://github.com/DasRed","followers_url":"https://api.github.com/users/DasRed/followers","following_url":"https://api.github.com/users/DasRed/following{/other_user}","gists_url":"https://api.github.com/users/DasRed/gists{/gist_id}","starred_url":"https://api.github.com/users/DasRed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DasRed/subscriptions","organizations_url":"https://api.github.com/users/DasRed/orgs","repos_url":"https://api.github.com/users/DasRed/repos","events_url":"https://api.github.com/users/DasRed/events{/privacy}","received_events_url":"https://api.github.com/users/DasRed/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/phalcon/cphalcon/labels/Fixed","name":"Fixed","color":"02d7e1"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-14T07:24:57Z","updated_at":"2015-05-21T08:44:48Z","closed_at":null,"body":"# Reproduction\r\nThis code let crash PHP.\r\n\r\n**Example 1**\r\n```php\r\n$reader = new \\Phalcon\\Annotations\\Reader();\r\nclass XXX\r\n{\r\n\r\n\t/**\r\n\t * after the fetching convert data to correct type\r\n\t */\r\n\tpublic function afterFetch()\r\n\t{\r\n\t}\r\n}\r\n\r\nprint_r($reader->parse('XXX'));\r\n```\r\n\r\n**Example 2**\r\n```php\r\n/**\r\n * model for database table \"bank_account\"\r\n */\r\nclass XXX extends \\Phalcon\\Mvc\\Model\r\n{\r\n}\r\n\r\n$reader = new \\Phalcon\\Annotations\\Reader();\r\nprint_r($reader->parse('XXX'));\r\n```\r\n\r\n# Environment\r\nPHP Version: \r\nPHP 5.6.4 (cli) (built: Dec 17 2014 13:20:35)\r\nCopyright (c) 1997-2014 The PHP Group\r\nZend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies\r\n    with Zend Debugger v8.0.0, Copyright (c) 1999-2014, by Zend Technologies\r\n\r\n\r\nWin7 : Microsoft Windows [Version 6.1.7601]\r\n\r\nPhalcon 2.0.1\r\n\r\n\r\n# Workaround\r\n\r\n**Example 1**\r\n```php\r\n$reader = new \\Phalcon\\Annotations\\Reader();\r\nclass XXX\r\n{\r\n\r\n\t/**\r\n\t * after the fetching convert data to correct type\r\n\t *\r\n\t * @return void\r\n\t */\r\n\tpublic function afterFetch()\r\n\t{\r\n\t}\r\n}\r\n\r\nprint_r($reader->parse('XXX'));\r\n```\r\n\r\nadded: @return void\r\n\r\n**Example 2**\r\n```php\r\n\r\n/**\r\n * @desc model for database table \"bank_account\"\r\n */\r\nclass XXX extends \\Phalcon\\Mvc\\Model\r\n{\r\n}\r\n\r\n$reader = new \\Phalcon\\Annotations\\Reader();\r\nprint_r($reader->parse('XXX'));\r\n```\r\nadded: @desc to PHPDocBlock"},"comment":{"url":"https://api.github.com/repos/phalcon/cphalcon/issues/comments/104183162","html_url":"https://github.com/phalcon/cphalcon/issues/10346#issuecomment-104183162","issue_url":"https://api.github.com/repos/phalcon/cphalcon/issues/10346","id":104183162,"user":{"login":"DasRed","id":2239808,"avatar_url":"https://avatars.githubusercontent.com/u/2239808?v=3","gravatar_id":"","url":"https://api.github.com/users/DasRed","html_url":"https://github.com/DasRed","followers_url":"https://api.github.com/users/DasRed/followers","following_url":"https://api.github.com/users/DasRed/following{/other_user}","gists_url":"https://api.github.com/users/DasRed/gists{/gist_id}","starred_url":"https://api.github.com/users/DasRed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DasRed/subscriptions","organizations_url":"https://api.github.com/users/DasRed/orgs","repos_url":"https://api.github.com/users/DasRed/repos","events_url":"https://api.github.com/users/DasRed/events{/privacy}","received_events_url":"https://api.github.com/users/DasRed/received_events","type":"User","site_admin":false},"created_at":"2015-05-21T08:44:48Z","updated_at":"2015-05-21T08:44:48Z","body":"@andresgutierrez I used the compiled downloadable version 2.0.1. If this not the 2.0.x branch?\r\nIf not, so release and deploy a brand new 2.0.x extension for Windows , then i can test it.\r\nI don't want it compile on my own ;)"}}