{"action":"created","issue":{"url":"https://api.github.com/repos/matecat/MateCat/issues/309","repository_url":"https://api.github.com/repos/matecat/MateCat","labels_url":"https://api.github.com/repos/matecat/MateCat/issues/309/labels{/name}","comments_url":"https://api.github.com/repos/matecat/MateCat/issues/309/comments","events_url":"https://api.github.com/repos/matecat/MateCat/issues/309/events","html_url":"https://github.com/matecat/MateCat/issues/309","id":166113358,"number":309,"title":"The @ upload modifier should be replaced by CURLFile object above php 5.6.","user":{"login":"yifanjiang","id":492959,"avatar_url":"https://avatars.githubusercontent.com/u/492959?v=3","gravatar_id":"","url":"https://api.github.com/users/yifanjiang","html_url":"https://github.com/yifanjiang","followers_url":"https://api.github.com/users/yifanjiang/followers","following_url":"https://api.github.com/users/yifanjiang/following{/other_user}","gists_url":"https://api.github.com/users/yifanjiang/gists{/gist_id}","starred_url":"https://api.github.com/users/yifanjiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yifanjiang/subscriptions","organizations_url":"https://api.github.com/users/yifanjiang/orgs","repos_url":"https://api.github.com/users/yifanjiang/repos","events_url":"https://api.github.com/users/yifanjiang/events{/privacy}","received_events_url":"https://api.github.com/users/yifanjiang/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/matecat/MateCat/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/matecat/MateCat/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-07-18T14:54:51Z","updated_at":"2016-09-20T17:06:26Z","closed_at":"2016-09-20T17:06:26Z","body":"It was aware that the curl option CURLOPT_SAFE_UPLOAD is set to true by default:\r\n\r\n```\r\nlib/Utils/Filters.php-41-            if ( PHP_MINOR_VERSION >= 5 ) {\r\nlib/Utils/Filters.php-42-                /**\r\nlib/Utils/Filters.php-43-                 * Added in PHP 5.5.0 with FALSE as the default value.\r\nlib/Utils/Filters.php-44-                 * PHP 5.6.0 changes the default value to TRUE.\r\nlib/Utils/Filters.php-45-                 */\r\nlib/Utils/Filters.php:46:                $options[ CURLOPT_SAFE_UPLOAD ] = false;\r\nlib/Utils/Filters.php-47-            }\r\n```\r\n\r\nHowever it doesn't really help much for a php5.6 environment. e.g. trying to upload a file from the upload page (front page) will lead to a file uploaded with unexpected file content, in which only the file path prefixed by an '@' instead the real file content resides.\r\n\r\nSo I guess something like this will be more usable:\r\n\r\n```\r\n- lib/Utils/Filters.php:            'documentContent' => \"@$filePath\",\r\n+ lib/Utils/Filters.php:           if ( PHP_MINOR_VERSION >= 6 ) {\r\n+ lib/Utils/Filters.php:                'documentContent' => new \\CURLFile($filePath),\r\n...\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/matecat/MateCat/issues/comments/248366046","html_url":"https://github.com/matecat/MateCat/issues/309#issuecomment-248366046","issue_url":"https://api.github.com/repos/matecat/MateCat/issues/309","id":248366046,"user":{"login":"yifanjiang","id":492959,"avatar_url":"https://avatars.githubusercontent.com/u/492959?v=3","gravatar_id":"","url":"https://api.github.com/users/yifanjiang","html_url":"https://github.com/yifanjiang","followers_url":"https://api.github.com/users/yifanjiang/followers","following_url":"https://api.github.com/users/yifanjiang/following{/other_user}","gists_url":"https://api.github.com/users/yifanjiang/gists{/gist_id}","starred_url":"https://api.github.com/users/yifanjiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yifanjiang/subscriptions","organizations_url":"https://api.github.com/users/yifanjiang/orgs","repos_url":"https://api.github.com/users/yifanjiang/repos","events_url":"https://api.github.com/users/yifanjiang/events{/privacy}","received_events_url":"https://api.github.com/users/yifanjiang/received_events","type":"User","site_admin":false},"created_at":"2016-09-20T17:06:26Z","updated_at":"2016-09-20T17:06:26Z","body":"Verified by cherry-pick to 1.0.5. Thank you!"}}
{"actor":{"display_login":"yifanjiang"}}