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

calls to zen_get_admin_module_from_directory from category_product listing: $product_type is int, not string #5901

Closed
torvista opened this issue Jul 27, 2023 · 0 comments

Comments

@torvista
Copy link
Member

php 8.2.8, strict mode

Admin, Copy (duplicate) product:

PHP Fatal error: Uncaught TypeError: zen_get_admin_module_from_directory(): Argument #1 ($product_type) must be of type string, int given, called in ADMIN\category_product_listing.php on line 219 and defined in \includes\functions\functions_files.php:150
Stack trace:
#0 D:ADMIN\category_product_listing.php(219): zen_get_admin_module_from_directory(1, 'copy_product_co...')
#1 D:ADMIN\index.php(21): require('D:\OneDrive\Bus...')
#2 {main}
thrown in \includes\functions\functions_files.php on line 150

$product_type = zen_get_products_type($category_product);

Function returns an integer.

require zen_get_admin_module_from_directory($product_type, 'copy_product_confirm.php');

Function expects a string

function zen_get_admin_module_from_directory(string $product_type, string $filename_to_check, bool $dir_only = false): string

@drbyte drbyte closed this as completed in 48516a2 Jul 28, 2023
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