[wp-trac] [WordPress Trac] #29548: WP_Filesystem_Base::getchmod() reporting permissions incorrectly
WordPress Trac
noreply at wordpress.org
Wed Jun 24 12:35:29 UTC 2015
#29548: WP_Filesystem_Base::getchmod() reporting permissions incorrectly
----------------------------------+---------------------------
Reporter: mnelson4 | Owner: DrewAPicture
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 4.3
Component: Filesystem API | Version: 2.5
Severity: normal | Resolution:
Keywords: has-patch needs-docs | Focuses:
----------------------------------+---------------------------
Comment (by DrewAPicture):
What I mean by comment:7 is this:
{{{
#!php
/**
* Base WordPress Filesystem class for which Filesystem implementations
extend
*
* @since 2.5.0
* @since 4.3.0 The `getchmod()` sub-class method was added to override
the parent.
*/
class WP_Filesystem_Base {
...
/**
* Gets the permissions of the specified file or filepath in their
octal format
*
* @since 2.5.0
*
* @param string $file
* @return string the last 3 characters of the octal number
*/
public function getchmod( $file ) {
return '777';
}
}}}
vs
{{{
#!php
/**
* Base WordPress Filesystem class for which Filesystem implementations
extend
*
* @since 2.5.0
*/
class WP_Filesystem_Base {
...
/**
* Gets the permissions of the specified file or filepath in their
octal format
*
* @since 2.5.0
* @since 4.3.0 Introduced in the sub-class to override the
parent.
*
* @param string $file
* @return string the last 3 characters of the octal number
*/
public function getchmod( $file ) {
return '777';
}
}}}
I think I like the second one better.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29548#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list