{"action":"created","comment":{"url":"https://api.github.com/repos/rainphp/raintpl/pulls/comments/57950424","id":57950424,"diff_hunk":"@@ -478,7 +478,7 @@ protected function compileCode( $parsed_code ){\n \t\t\t\t$value = \"\\$value$loop_level\";           // value\n \n \t\t\t\t//loop code\n-\t\t\t\t$compiled_code .=  \"<?php $counter=-1; if( isset($var) && is_array($var) && sizeof($var) ) foreach( $var as $key => $value ){ $counter++; ?>\";\n+\t\t\t\t$compiled_code .=  \"<?php $counter=-1; if( $var !== null && is_array($var) && sizeof($var) ) foreach( $var as $key => $value ){ $counter++; ?>\";","path":"inc/rain.tpl.class.php","position":5,"original_position":5,"commit_id":"b464ec4c8d90b0bfc950512dfdb458017f87f20d","original_commit_id":"b464ec4c8d90b0bfc950512dfdb458017f87f20d","user":{"login":"rainphp","id":540035,"avatar_url":"https://avatars.githubusercontent.com/u/540035?v=3","gravatar_id":"","url":"https://api.github.com/users/rainphp","html_url":"https://github.com/rainphp","followers_url":"https://api.github.com/users/rainphp/followers","following_url":"https://api.github.com/users/rainphp/following{/other_user}","gists_url":"https://api.github.com/users/rainphp/gists{/gist_id}","starred_url":"https://api.github.com/users/rainphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rainphp/subscriptions","organizations_url":"https://api.github.com/users/rainphp/orgs","repos_url":"https://api.github.com/users/rainphp/repos","events_url":"https://api.github.com/users/rainphp/events{/privacy}","received_events_url":"https://api.github.com/users/rainphp/received_events","type":"User","site_admin":false},"body":"@Phyks instead of ```$var !== null``` we can use ```is_null($var)```, that works with both undefined variables and return of function calls.","created_at":"2016-03-30T19:40:59Z","updated_at":"2016-03-30T19:40:59Z","html_url":"https://github.com/rainphp/raintpl/pull/37#discussion_r57950424","pull_request_url":"https://api.github.com/repos/rainphp/raintpl/pulls/37","_links":{"self":{"href":"https://api.github.com/repos/rainphp/raintpl/pulls/comments/57950424"},"html":{"href":"https://github.com/rainphp/raintpl/pull/37#discussion_r57950424"},"pull_request":{"href":"https://api.github.com/repos/rainphp/raintpl/pulls/37"}}},"pull_request":{"url":"https://api.github.com/repos/rainphp/raintpl/pulls/37","id":8486400,"html_url":"https://github.com/rainphp/raintpl/pull/37","diff_url":"https://github.com/rainphp/raintpl/pull/37.diff","patch_url":"https://github.com/rainphp/raintpl/pull/37.patch","issue_url":"https://api.github.com/repos/rainphp/raintpl/issues/37","number":37,"state":"open","locked":false,"title":"Replaced isset($var) by $var !== null on line 481","user":{"login":"Phyks","id":3856586,"avatar_url":"https://avatars.githubusercontent.com/u/3856586?v=3","gravatar_id":"","url":"https://api.github.com/users/Phyks","html_url":"https://github.com/Phyks","followers_url":"https://api.github.com/users/Phyks/followers","following_url":"https://api.github.com/users/Phyks/following{/other_user}","gists_url":"https://api.github.com/users/Phyks/gists{/gist_id}","starred_url":"https://api.github.com/users/Phyks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Phyks/subscriptions","organizations_url":"https://api.github.com/users/Phyks/orgs","repos_url":"https://api.github.com/users/Phyks/repos","events_url":"https://api.github.com/users/Phyks/events{/privacy}","received_events_url":"https://api.github.com/users/Phyks/received_events","type":"User","site_admin":false},"body":"This allows to iterate through function results (function which returns\r\nan array for example). See issue\r\nhttps://github.com/rainphp/raintpl/issues/35#issuecomment-24786805","created_at":"2013-09-20T15:18:18Z","updated_at":"2016-03-30T19:40:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"03a99e8a629cda5fdc2a9d2225ec501df0b2415d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rainphp/raintpl/pulls/37/commits","review_comments_url":"https://api.github.com/repos/rainphp/raintpl/pulls/37/comments","review_comment_url":"https://api.github.com/repos/rainphp/raintpl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rainphp/raintpl/issues/37/comments","statuses_url":"https://api.github.com/repos/rainphp/raintpl/statuses/b464ec4c8d90b0bfc950512dfdb458017f87f20d","head":{"label":"Phyks:iterate_results","ref":"iterate_results","sha":"b464ec4c8d90b0bfc950512dfdb458017f87f20d","user":{"login":"Phyks","id":3856586,"avatar_url":"https://avatars.githubusercontent.com/u/3856586?v=3","gravatar_id":"","url":"https://api.github.com/users/Phyks","html_url":"https://github.com/Phyks","followers_url":"https://api.github.com/users/Phyks/followers","following_url":"https://api.github.com/users/Phyks/following{/other_user}","gists_url":"https://api.github.com/users/Phyks/gists{/gist_id}","starred_url":"https://api.github.com/users/Phyks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Phyks/subscriptions","organizations_url":"https://api.github.com/users/Phyks/orgs","repos_url":"https://api.github.com/users/Phyks/repos","events_url":"https://api.github.com/users/Phyks/events{/privacy}","received_events_url":"https://api.github.com/users/Phyks/received_events","type":"User","site_admin":false},"repo":{"id":12623440,"name":"raintpl","full_name":"Phyks/raintpl","owner":{"login":"Phyks","id":3856586,"avatar_url":"https://avatars.githubusercontent.com/u/3856586?v=3","gravatar_id":"","url":"https://api.github.com/users/Phyks","html_url":"https://github.com/Phyks","followers_url":"https://api.github.com/users/Phyks/followers","following_url":"https://api.github.com/users/Phyks/following{/other_user}","gists_url":"https://api.github.com/users/Phyks/gists{/gist_id}","starred_url":"https://api.github.com/users/Phyks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Phyks/subscriptions","organizations_url":"https://api.github.com/users/Phyks/orgs","repos_url":"https://api.github.com/users/Phyks/repos","events_url":"https://api.github.com/users/Phyks/events{/privacy}","received_events_url":"https://api.github.com/users/Phyks/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Phyks/raintpl","description":"Easy Php Template Engine","fork":true,"url":"https://api.github.com/repos/Phyks/raintpl","forks_url":"https://api.github.com/repos/Phyks/raintpl/forks","keys_url":"https://api.github.com/repos/Phyks/raintpl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Phyks/raintpl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Phyks/raintpl/teams","hooks_url":"https://api.github.com/repos/Phyks/raintpl/hooks","issue_events_url":"https://api.github.com/repos/Phyks/raintpl/issues/events{/number}","events_url":"https://api.github.com/repos/Phyks/raintpl/events","assignees_url":"https://api.github.com/repos/Phyks/raintpl/assignees{/user}","branches_url":"https://api.github.com/repos/Phyks/raintpl/branches{/branch}","tags_url":"https://api.github.com/repos/Phyks/raintpl/tags","blobs_url":"https://api.github.com/repos/Phyks/raintpl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Phyks/raintpl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Phyks/raintpl/git/refs{/sha}","trees_url":"https://api.github.com/repos/Phyks/raintpl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Phyks/raintpl/statuses/{sha}","languages_url":"https://api.github.com/repos/Phyks/raintpl/languages","stargazers_url":"https://api.github.com/repos/Phyks/raintpl/stargazers","contributors_url":"https://api.github.com/repos/Phyks/raintpl/contributors","subscribers_url":"https://api.github.com/repos/Phyks/raintpl/subscribers","subscription_url":"https://api.github.com/repos/Phyks/raintpl/subscription","commits_url":"https://api.github.com/repos/Phyks/raintpl/commits{/sha}","git_commits_url":"https://api.github.com/repos/Phyks/raintpl/git/commits{/sha}","comments_url":"https://api.github.com/repos/Phyks/raintpl/comments{/number}","issue_comment_url":"https://api.github.com/repos/Phyks/raintpl/issues/comments{/number}","contents_url":"https://api.github.com/repos/Phyks/raintpl/contents/{+path}","compare_url":"https://api.github.com/repos/Phyks/raintpl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Phyks/raintpl/merges","archive_url":"https://api.github.com/repos/Phyks/raintpl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Phyks/raintpl/downloads","issues_url":"https://api.github.com/repos/Phyks/raintpl/issues{/number}","pulls_url":"https://api.github.com/repos/Phyks/raintpl/pulls{/number}","milestones_url":"https://api.github.com/repos/Phyks/raintpl/milestones{/number}","notifications_url":"https://api.github.com/repos/Phyks/raintpl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Phyks/raintpl/labels{/name}","releases_url":"https://api.github.com/repos/Phyks/raintpl/releases{/id}","deployments_url":"https://api.github.com/repos/Phyks/raintpl/deployments","created_at":"2013-09-05T17:00:23Z","updated_at":"2013-09-20T16:49:29Z","pushed_at":"2013-09-20T15:17:51Z","git_url":"git://github.com/Phyks/raintpl.git","ssh_url":"git@github.com:Phyks/raintpl.git","clone_url":"https://github.com/Phyks/raintpl.git","svn_url":"https://github.com/Phyks/raintpl","homepage":"http://www.raintpl.com","size":161,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rainphp:master","ref":"master","sha":"66d5a389074a3fdc3490e108b3c0e038165927a4","user":{"login":"rainphp","id":540035,"avatar_url":"https://avatars.githubusercontent.com/u/540035?v=3","gravatar_id":"","url":"https://api.github.com/users/rainphp","html_url":"https://github.com/rainphp","followers_url":"https://api.github.com/users/rainphp/followers","following_url":"https://api.github.com/users/rainphp/following{/other_user}","gists_url":"https://api.github.com/users/rainphp/gists{/gist_id}","starred_url":"https://api.github.com/users/rainphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rainphp/subscriptions","organizations_url":"https://api.github.com/users/rainphp/orgs","repos_url":"https://api.github.com/users/rainphp/repos","events_url":"https://api.github.com/users/rainphp/events{/privacy}","received_events_url":"https://api.github.com/users/rainphp/received_events","type":"User","site_admin":false},"repo":{"id":1205284,"name":"raintpl","full_name":"rainphp/raintpl","owner":{"login":"rainphp","id":540035,"avatar_url":"https://avatars.githubusercontent.com/u/540035?v=3","gravatar_id":"","url":"https://api.github.com/users/rainphp","html_url":"https://github.com/rainphp","followers_url":"https://api.github.com/users/rainphp/followers","following_url":"https://api.github.com/users/rainphp/following{/other_user}","gists_url":"https://api.github.com/users/rainphp/gists{/gist_id}","starred_url":"https://api.github.com/users/rainphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rainphp/subscriptions","organizations_url":"https://api.github.com/users/rainphp/orgs","repos_url":"https://api.github.com/users/rainphp/repos","events_url":"https://api.github.com/users/rainphp/events{/privacy}","received_events_url":"https://api.github.com/users/rainphp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rainphp/raintpl","description":"Easy Php Template Engine","fork":false,"url":"https://api.github.com/repos/rainphp/raintpl","forks_url":"https://api.github.com/repos/rainphp/raintpl/forks","keys_url":"https://api.github.com/repos/rainphp/raintpl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rainphp/raintpl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rainphp/raintpl/teams","hooks_url":"https://api.github.com/repos/rainphp/raintpl/hooks","issue_events_url":"https://api.github.com/repos/rainphp/raintpl/issues/events{/number}","events_url":"https://api.github.com/repos/rainphp/raintpl/events","assignees_url":"https://api.github.com/repos/rainphp/raintpl/assignees{/user}","branches_url":"https://api.github.com/repos/rainphp/raintpl/branches{/branch}","tags_url":"https://api.github.com/repos/rainphp/raintpl/tags","blobs_url":"https://api.github.com/repos/rainphp/raintpl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rainphp/raintpl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rainphp/raintpl/git/refs{/sha}","trees_url":"https://api.github.com/repos/rainphp/raintpl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rainphp/raintpl/statuses/{sha}","languages_url":"https://api.github.com/repos/rainphp/raintpl/languages","stargazers_url":"https://api.github.com/repos/rainphp/raintpl/stargazers","contributors_url":"https://api.github.com/repos/rainphp/raintpl/contributors","subscribers_url":"https://api.github.com/repos/rainphp/raintpl/subscribers","subscription_url":"https://api.github.com/repos/rainphp/raintpl/subscription","commits_url":"https://api.github.com/repos/rainphp/raintpl/commits{/sha}","git_commits_url":"https://api.github.com/repos/rainphp/raintpl/git/commits{/sha}","comments_url":"https://api.github.com/repos/rainphp/raintpl/comments{/number}","issue_comment_url":"https://api.github.com/repos/rainphp/raintpl/issues/comments{/number}","contents_url":"https://api.github.com/repos/rainphp/raintpl/contents/{+path}","compare_url":"https://api.github.com/repos/rainphp/raintpl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rainphp/raintpl/merges","archive_url":"https://api.github.com/repos/rainphp/raintpl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rainphp/raintpl/downloads","issues_url":"https://api.github.com/repos/rainphp/raintpl/issues{/number}","pulls_url":"https://api.github.com/repos/rainphp/raintpl/pulls{/number}","milestones_url":"https://api.github.com/repos/rainphp/raintpl/milestones{/number}","notifications_url":"https://api.github.com/repos/rainphp/raintpl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rainphp/raintpl/labels{/name}","releases_url":"https://api.github.com/repos/rainphp/raintpl/releases{/id}","deployments_url":"https://api.github.com/repos/rainphp/raintpl/deployments","created_at":"2010-12-29T08:50:51Z","updated_at":"2016-03-20T16:22:29Z","pushed_at":"2015-04-11T16:16:22Z","git_url":"git://github.com/rainphp/raintpl.git","ssh_url":"git@github.com:rainphp/raintpl.git","clone_url":"https://github.com/rainphp/raintpl.git","svn_url":"https://github.com/rainphp/raintpl","homepage":"https://rainphp.github.io/raintpl","size":843,"stargazers_count":176,"watchers_count":176,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":50,"mirror_url":null,"open_issues_count":7,"forks":50,"open_issues":7,"watchers":176,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rainphp/raintpl/pulls/37"},"html":{"href":"https://github.com/rainphp/raintpl/pull/37"},"issue":{"href":"https://api.github.com/repos/rainphp/raintpl/issues/37"},"comments":{"href":"https://api.github.com/repos/rainphp/raintpl/issues/37/comments"},"review_comments":{"href":"https://api.github.com/repos/rainphp/raintpl/pulls/37/comments"},"review_comment":{"href":"https://api.github.com/repos/rainphp/raintpl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rainphp/raintpl/pulls/37/commits"},"statuses":{"href":"https://api.github.com/repos/rainphp/raintpl/statuses/b464ec4c8d90b0bfc950512dfdb458017f87f20d"}}}}