{"action":"created","issue":{"url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/4200","labels_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/4200/labels{/name}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/4200/comments","events_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/4200/events","html_url":"https://github.com/silverstripe/silverstripe-framework/pull/4200","id":77945474,"number":4200,"title":"Bug fix: File->setName()","user":{"login":"cwchong","id":3969815,"avatar_url":"https://avatars.githubusercontent.com/u/3969815?v=3","gravatar_id":"","url":"https://api.github.com/users/cwchong","html_url":"https://github.com/cwchong","followers_url":"https://api.github.com/users/cwchong/followers","following_url":"https://api.github.com/users/cwchong/following{/other_user}","gists_url":"https://api.github.com/users/cwchong/gists{/gist_id}","starred_url":"https://api.github.com/users/cwchong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwchong/subscriptions","organizations_url":"https://api.github.com/users/cwchong/orgs","repos_url":"https://api.github.com/users/cwchong/repos","events_url":"https://api.github.com/users/cwchong/events{/privacy}","received_events_url":"https://api.github.com/users/cwchong/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-19T05:47:45Z","updated_at":"2015-06-18T03:18:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/4200","html_url":"https://github.com/silverstripe/silverstripe-framework/pull/4200","diff_url":"https://github.com/silverstripe/silverstripe-framework/pull/4200.diff","patch_url":"https://github.com/silverstripe/silverstripe-framework/pull/4200.patch"},"body":"Logical error. $base should use PATHINFO_FILENAME instead of\r\nPATHINFO_BASENAME in order to exclude extension; final $name should\r\ninclude a period before $ext as $ext uses PATHINFO_EXTENSION which\r\nexcludes the period.\r\n\r\nReference issue: https://github.com/silverstripe/silverstripe-framework/issues/4187"},"comment":{"url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/comments/113024216","html_url":"https://github.com/silverstripe/silverstripe-framework/pull/4200#issuecomment-113024216","issue_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/4200","id":113024216,"user":{"login":"cwchong","id":3969815,"avatar_url":"https://avatars.githubusercontent.com/u/3969815?v=3","gravatar_id":"","url":"https://api.github.com/users/cwchong","html_url":"https://github.com/cwchong","followers_url":"https://api.github.com/users/cwchong/followers","following_url":"https://api.github.com/users/cwchong/following{/other_user}","gists_url":"https://api.github.com/users/cwchong/gists{/gist_id}","starred_url":"https://api.github.com/users/cwchong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwchong/subscriptions","organizations_url":"https://api.github.com/users/cwchong/orgs","repos_url":"https://api.github.com/users/cwchong/repos","events_url":"https://api.github.com/users/cwchong/events{/privacy}","received_events_url":"https://api.github.com/users/cwchong/received_events","type":"User","site_admin":false},"created_at":"2015-06-18T03:18:53Z","updated_at":"2015-06-18T03:18:53Z","body":"The example I gave behaves exactly as described by the php documentation at http://php.net/manual/en/function.pathinfo.php\r\n\r\n$myfile = \"/path/to/myfile.txt\";\r\necho pathinfo($myfile, PATHINFO_BASENAME) .\"\\n\"; // returns WITH extension \"myfile.txt\"\r\necho pathinfo($myfile, PATHINFO_FILENAME ) .\"\\n\"; // returns WITHOUT extension \"myfile\"\r\n\r\nThis is contrary to what you have just listed.\r\nMay I ask which documentation are you referring to?"}}