Amazon_S3_And_CloudFront::prepare_bucket_error PHP Method

prepare_bucket_error() public method

Prepare the bucket error before returning to JS
public prepare_bucket_error ( WP_Error $object, boolean $single = true ) : array
$object WP_Error
$single boolean Are we dealing with a single bucket?
return array
    function prepare_bucket_error($object, $single = true)
    {
        if ('Access Denied' === $object->get_error_message()) {
            // If the bucket error is access denied, show our notice message
            $out = array('error' => $this->get_access_denied_notice_message($single));
        } else {
            $out = array('error' => $object->get_error_message());
        }
        return $out;
    }
Amazon_S3_And_CloudFront