d1imt
Forum Replies Created
-
It has to do with the use of curly braces. PHP8 no longer permits the use of curly braces to access arrays, so those will have to be fixed. I had the same problem…
Forum: Themes and Templates
In reply to: [Astra] Astra Pro DB Option (astra-settings)Figured it out…. Since the option is a serialized array I had to update the string counts…
- This reply was modified 3 years, 2 months ago by d1imt. Reason: Resolved
Forum: Fixing WordPress
In reply to: WordPress Max Upload Bug@azaozz For both upload_max_filesize and post_max_size the value is reported as “64M” in phpinfo.
Edit:
I did a little further digging and the line that adds the filter is in ms-default-filters.php.L99: add_filter( 'upload_size_limit', 'upload_size_limit_filter' );
The default number of args when the 4th parameter isn’t specified is 1. The MS filter thus is only registering 1 argument, which is what the upload_size_limit_filter accepts. The apply_filter line cited above in media.php is passing an unexpected number of arguments.
- This reply was modified 3 years, 4 months ago by d1imt.
Forum: Fixing WordPress
In reply to: WordPress Max Upload Bug@antonvlasenko The call to apply_filters inside the function body of wp_max_upload_size passes 3 arguments (i.e. min( $u_bytes, $p_bytes ), $u_bytes, and $p_bytes). The receiving function, upload_size_limit_filter() in ms-functions.php, only accepts a single argument of $size. I believe passing the last 2 arguments $u_bytes and $p_bytes to the apply_filters function is redundant and actually causing an error to be returned on that line which evaluates to 0. That is why when I commented those two arguments out, everything worked as expected.