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

PHP Warnings when file is missing in filter_attachment_meta_data #223

Open
tomjn opened this issue May 17, 2024 · 0 comments
Open

PHP Warnings when file is missing in filter_attachment_meta_data #223

tomjn opened this issue May 17, 2024 · 0 comments

Comments

@tomjn
Copy link
Contributor

tomjn commented May 17, 2024

We have a situation where this code generates lots of warnings:

	$filename = pathinfo( $data['file'], PATHINFO_FILENAME );
	$ext = pathinfo( $data['file'], PATHINFO_EXTENSION );

Specifically: Undefined array key "file"

https://github.com/humanmade/smart-media/blob/master/inc/cropper/namespace.php#L777-L778

I'm wondering if that means the function should exit early?

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

No branches or pull requests

1 participant