open( $path ) ) { return 'zip_unreadable'; } return $zip; } /** * Human text for an error code returned by open(). * * @param string $code Error code. * @return string */ public static function error_message( $code ) { switch ( $code ) { case 'zip_extension_missing': return 'The PHP ZipArchive extension is unavailable.'; case 'file_missing': return 'No plugin ZIP was uploaded.'; default: return 'Cannot open the selected ZIP.'; } } }