{"action":"created","issue":{"url":"https://api.github.com/repos/CanalTP/pdfGenerator/issues/5","labels_url":"https://api.github.com/repos/CanalTP/pdfGenerator/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/CanalTP/pdfGenerator/issues/5/comments","events_url":"https://api.github.com/repos/CanalTP/pdfGenerator/issues/5/events","html_url":"https://github.com/CanalTP/pdfGenerator/pull/5","id":93225550,"number":5,"title":"Use equal operator instead of identical (===) for cmyk parameter.","user":{"login":"eturck","id":5136553,"avatar_url":"https://avatars.githubusercontent.com/u/5136553?v=3","gravatar_id":"","url":"https://api.github.com/users/eturck","html_url":"https://github.com/eturck","followers_url":"https://api.github.com/users/eturck/followers","following_url":"https://api.github.com/users/eturck/following{/other_user}","gists_url":"https://api.github.com/users/eturck/gists{/gist_id}","starred_url":"https://api.github.com/users/eturck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eturck/subscriptions","organizations_url":"https://api.github.com/users/eturck/orgs","repos_url":"https://api.github.com/users/eturck/repos","events_url":"https://api.github.com/users/eturck/events{/privacy}","received_events_url":"https://api.github.com/users/eturck/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-07-06T08:48:16Z","updated_at":"2015-07-06T12:53:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/CanalTP/pdfGenerator/pulls/5","html_url":"https://github.com/CanalTP/pdfGenerator/pull/5","diff_url":"https://github.com/CanalTP/pdfGenerator/pull/5.diff","patch_url":"https://github.com/CanalTP/pdfGenerator/pull/5.patch"},"body":"Since $_GET parameters are strings, $_GET['cmyk'] === 1 was always false.\r\n\r\nI used == instead of ===.\r\nWe could also do : \r\n```php\r\nif (isset($_GET['cmyk']) && $_GET['cmyk'])\r\n// But it's going to be true for 2, 3 or potato\r\n```\r\nOr : \r\n```php\r\nif (isset($_GET['cmyk']) && intval($_GET['cmyk']) == 1)\r\n```\r\nOr even, to keep the identical operator : \r\n```php\r\nif (isset($_GET['cmyk']) && $_GET['cmyk'] === '1')\r\n```\r\nI don't know if you have some guidelines / preferences for those things :)."},"comment":{"url":"https://api.github.com/repos/CanalTP/pdfGenerator/issues/comments/118845451","html_url":"https://github.com/CanalTP/pdfGenerator/pull/5#issuecomment-118845451","issue_url":"https://api.github.com/repos/CanalTP/pdfGenerator/issues/5","id":118845451,"user":{"login":"datanel","id":187239,"avatar_url":"https://avatars.githubusercontent.com/u/187239?v=3","gravatar_id":"","url":"https://api.github.com/users/datanel","html_url":"https://github.com/datanel","followers_url":"https://api.github.com/users/datanel/followers","following_url":"https://api.github.com/users/datanel/following{/other_user}","gists_url":"https://api.github.com/users/datanel/gists{/gist_id}","starred_url":"https://api.github.com/users/datanel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datanel/subscriptions","organizations_url":"https://api.github.com/users/datanel/orgs","repos_url":"https://api.github.com/users/datanel/repos","events_url":"https://api.github.com/users/datanel/events{/privacy}","received_events_url":"https://api.github.com/users/datanel/received_events","type":"User","site_admin":false},"created_at":"2015-07-06T12:53:11Z","updated_at":"2015-07-06T12:53:11Z","body":"yes but we need another param that is not a boolean we cannot use php's filter"}}