I get this error a lot. I think the fallout for photo’s is missing, or there is a function planned there that is not complete:
July 6, 2025 7:19 PM BST PHP Warning compact(): Undefined variable $ Plugin: MediaPress File: /wp-content/plugins/mediapress-2-newest/core/media/mpp-media-functions.php Line: 1157
Hi George,
Thank you for reporting the issue.I am not sure what version you are using but that file does not have 1157 lines. It has less than 1130 lines in both 1.x and 2.x.
Are you sure you are referring to the correct file in the error message?https://github.com/buddydev/mediapress/blob/2.0-dev/core/media/mpp-media-functions.php
Regards
BrajeshI can confirm the error reported by you on a different line(1120).
The solution is to change this
return compact( $title, $content );
to
return array( 'title' => $title, 'content' => $content );
I will be pushing the change soon.
Regards
BrajeshThank you George.
I found another line of code throwing a notice while creating gallery from backend and added a fix. I have pushed these 2 changes to 2.x branch. I have been mostly testing sitewide gallery, will test BuddyPress gallery soon too.
Regards
Brajesh
You must be logged in to reply to this topic.