Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught Error: Cannot use object of type WP_Error as array in brightcove-video-connect/includes/api/class-bc-cms-api.php:804 #188

Closed
84em opened this issue Dec 29, 2020 · 1 comment · Fixed by #190
Assignees
Labels
Milestone

Comments

@84em
Copy link

84em commented Dec 29, 2020

When activating the plugin I receive the following error.

Uncaught Error: Cannot use object of type WP_Error as array in brightcove-video-connect/includes/api/class-bc-cms-api.php:804

Changing the method to this, fixes the issue:

public function get_account_labels() {
	$result = $this->send_request( esc_url_raw( self::CMS_BASE_URL . $this->get_account_id() . '/labels/' ), 'GET' );
	if ( is_wp_error( $result) || empty( $result['labels'] ) ) {
		return false;
	}
	return $result['labels'];
}

@84em 84em added the type:bug label Dec 29, 2020
@84em 84em changed the title Uncaught Error: Cannot use object of type WP_Error as array in brightcove-video-connect-disabled/includes/api/class-bc-cms-api.php:804 Uncaught Error: Cannot use object of type WP_Error as array in brightcove-video-connect/includes/api/class-bc-cms-api.php:804 Dec 29, 2020
@jeffpaul jeffpaul added this to the 2.2.0 milestone Jan 11, 2021
@oscarssanchez
Copy link
Contributor

Hi @84em ,

Thanks for flagging this! We have merged the fix for it and it should be out soon.

@jeffpaul jeffpaul modified the milestones: 2.2.0, 2.1.1 Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants