Bug Found & Fixed
-
PHP Ver: 5.5.17
OS: Centos 5
Apache: 2.2.29I installed this and not only did it not work (hung in admin), but also created a 458mb error_log file in wp-admin.
I dug into the errors and found that these fields in the Options table had no values (the fields existed, but had no values):
auto_image_width auto_image_height auto_image_fontsize
I fixed that in the db, but it still failed and created a 458mb error_log file.
It now works properly due to these changes.
Changed this:add_option('auto_image_fontsize',"72");
To this:
add_option('auto_image_fontsize',72);
Added these after the last add_option on line 36:
$auto_image_width = 640; $auto_image_height = 360; $auto_image_fontsize = 72;
Added these after line 137:
$red = 255; $grn = 255; $blu = 255; $red = $shadow["red"]; $grn = $shadow["green"]; $blu = $shadow["blue"];
Changed line 140 to use the new vars:
$shadow_color = imagecolorallocate( $new_featured_img, $red, $grn, $blu);
It’s working for me now.
Thanks for writing it…was going to create this exact plugin.
Rob
https://www.ads-software.com/plugins/auto-featured-image-from-title/
- The topic ‘Bug Found & Fixed’ is closed to new replies.