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

Fix for empty media types #5924

Merged
merged 3 commits into from
Aug 5, 2023
Merged

Fix for empty media types #5924

merged 3 commits into from
Aug 5, 2023

Conversation

proseLA
Copy link
Sponsor Contributor

@proseLA proseLA commented Aug 4, 2023

see #5923

addresses problems created by #5349

someone else can handle the other scripts.

@torvista
Copy link
Member

torvista commented Aug 4, 2023

php 8.3beta, strict reporting

Doing an add, save, edit, save, I get an error on the save.

[04-Aug-2023 17:25:24 Europe/Madrid]
ADMIN
Request URI: ADMIN/index.php?cmd=media_types&page=1&action=save
IP address: 127.0.0.1, Language id 1
#1 require(ADMIN/media_types.php) called at [ADMIN/index.php:21]
--> PHP Notice: Undefined variable: type_id in ADMIN/media_types.php on line 40.

[04-Aug-2023 17:25:24 Europe/Madrid]
ADMIN
Request URI: ADMIN/index.php?cmd=media_types&page=1&action=save
IP address: 127.0.0.1, Language id 1
#1 require(ADMIN/media_types.php) called at [ADMIN/index.php:21]
--> PHP Notice: Undefined variable: type_id in ADMIN/media_types.php on line 43.

@proseLA
Copy link
Sponsor Contributor Author

proseLA commented Aug 4, 2023

not real sure what that has to do with the insert not being there.

}
$mType_parameter = '';
if (!$media_types->EOF) {
$mType_parameter = '&mID=' . $mInfo->type_id;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible that $mInfo still could be undefined here?
Ref line 87

Copy link
Sponsor Contributor Author

@proseLA proseLA Aug 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in looking at torvista's comment; perhaps. hopefully the new change addresses that.

@drbyte drbyte merged commit 4d8945c into zencart:v200 Aug 5, 2023
5 checks passed
simon1066 added a commit to simon1066/zencart that referenced this pull request Aug 15, 2023
Fixes zencart#5923
Admin > Extras > Media Types was fixed in zencart#5924, this PR fixes the remaining sub-menus

`media_manager.php` may need a closer check as it's possible that I may have lost my way.
drbyte pushed a commit that referenced this pull request Aug 17, 2023
* Fix for empty Extras sub-menus
Fixes #5923
Admin > Extras > Media Types was fixed in #5924, this PR fixes the remaining sub-menus
@proseLA proseLA deleted the empty-media-types branch August 25, 2023 13:44
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

Successfully merging this pull request may close these issues.

None yet

3 participants