Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Upload Media Error #5

Open
carasmo opened this issue Nov 28, 2017 · 4 comments
Open

Upload Media Error #5

carasmo opened this issue Nov 28, 2017 · 4 comments
Assignees

Comments

@carasmo
Copy link

carasmo commented Nov 28, 2017

With this plugin active, when I click add new media, I get:

Notice: Trying to get property of non-object in /app/public/wp-includes/media.php on line 3467 Notice: Trying to get property of non-object in /app/public/wp-includes/media.php on line 3468 Notice: Trying to get property of non-object in /app/public/wp-includes/media.php on line 3471 Notice: Trying to get property of non-object in /app/public/wp-includes/media.php on line 3471 Notice: Trying to get property of non-object in /app/public/wp-includes/media.php on line 3472

Local dev. 4.9. No other plugins active. Genesis Sample theme.

Any ideas how to correct this?

@carasmo
Copy link
Author

carasmo commented Nov 28, 2017

This removes the error and the plugin works.

Change run() in class-controller-main.php

	/**
	 * Do Work
	 */
	public function run() {
		load_plugin_textdomain( 'link-picker-for-cmb2', false, MKDO_LPFC_ROOT . '\languages' );

		global $pagenow;
		if ( $pagenow != 'media-new.php' ) {
			$this->controller_assets->run();
		}
		
		$this->render_meta_box->run();
	}

@mattwatsoncodes
Copy link
Owner

Thank you @carasmo, we will get this patched in the next release.

@m9n
Copy link
Collaborator

m9n commented Dec 6, 2017

Should be resolved with #9

@mattwatsoncodes
Copy link
Owner

Resolved now, thanks @m9n, I'll leave this open until it is pushed to the WP repo.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants