{"action":"opened","issue":{"url":"https://api.github.com/repos/propelorm/Propel2/issues/946","labels_url":"https://api.github.com/repos/propelorm/Propel2/issues/946/labels{/name}","comments_url":"https://api.github.com/repos/propelorm/Propel2/issues/946/comments","events_url":"https://api.github.com/repos/propelorm/Propel2/issues/946/events","html_url":"https://github.com/propelorm/Propel2/issues/946","id":87674360,"number":946,"title":"php function current doesn't work with ObjectCollection","user":{"login":"sebastian301082-KAM","id":12069121,"avatar_url":"https://avatars.githubusercontent.com/u/12069121?v=3","gravatar_id":"","url":"https://api.github.com/users/sebastian301082-KAM","html_url":"https://github.com/sebastian301082-KAM","followers_url":"https://api.github.com/users/sebastian301082-KAM/followers","following_url":"https://api.github.com/users/sebastian301082-KAM/following{/other_user}","gists_url":"https://api.github.com/users/sebastian301082-KAM/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastian301082-KAM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastian301082-KAM/subscriptions","organizations_url":"https://api.github.com/users/sebastian301082-KAM/orgs","repos_url":"https://api.github.com/users/sebastian301082-KAM/repos","events_url":"https://api.github.com/users/sebastian301082-KAM/events{/privacy}","received_events_url":"https://api.github.com/users/sebastian301082-KAM/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-12T09:49:48Z","updated_at":"2015-06-12T09:49:48Z","closed_at":null,"body":"I saw in a project following code and I'm not sure if there is a problem in propel or if this shouldn't work at all.\r\n\r\n```\r\n$books = $author->getBooks();\r\n$book = current($books);\r\nvar_dump($book);\r\n```\r\n\r\nor\r\n\r\n```\r\n$collection = new ObjectCollection(\r\n    [\r\n        new Book(),\r\n        new Book(),\r\n    ]\r\n);\r\nvar_dump(current($collection));\r\n```\r\n\r\nIn both cases var_dump printend following code:\r\n```\r\narray(2) {\r\n  '000000002d6b9b740000000021933b71' =>\r\n  int(0)\r\n  '000000002d6b9b780000000021933b71' =>\r\n  int(1)\r\n}\r\n```\r\n\r\nBut expected was a single instance of Book.\r\n\r\nPlease let me know if this is an issue in propel or if this is an expected behaviour. "}}