- Timestamp:
- 12/22/2025 01:16:28 AM (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-filesystem-direct.php
r57644 r61398 250 250 * Gets the permissions of the specified file or filepath in their octal format. 251 251 * 252 * FIXME does not handle errors in fileperms()253 *254 252 * @since 2.5.0 255 253 * 256 254 * @param string $file Path to the file. 257 * @return string Mode of the file (the last 3 digits) .255 * @return string Mode of the file (the last 3 digits), or the string "0" on failure. 258 256 */ 259 257 public function getchmod( $file ) { 260 return substr( decoct( @fileperms( $file ) ), -3 ); 258 $perms = @fileperms( $file ); 259 if ( false === $perms ) { 260 return '0'; 261 } 262 263 return substr( decoct( $perms ), -3 ); 261 264 } 262 265
Note: See TracChangeset
for help on using the changeset viewer.