Closed k1sul1 closed 7 years ago
Today while crawling through the logs, I found these:
https://github.com/anttiviljami/wp-libre-form/blob/master/inc/wplf-form-actions.php#L77 https://github.com/anttiviljami/wp-libre-form/blob/master/inc/wplf-form-actions.php#L84
AFAIK there's no $attachment defined anywhere and that results in a notice.
I also spotted this stack trace that probably has something to do with this:
[27-Jun-2017 09:12:36 UTC] PHP Notice: Object of class WP_Error could not be c$ nverted to int in /data/wordpress/htdocs/wordpress/wp-includes/post.php on line 5030 [27-Jun-2017 09:12:36 UTC] PHP Stack trace: [27-Jun-2017 09:12:36 UTC] PHP 1. {main}() /data/wordpress/htdocs/wordpress/w$ -admin/admin-ajax.php:0 [27-Jun-2017 09:12:36 UTC] PHP 2. do_action($tag = 'wp_ajax_nopriv_wplf_submi$ ', $arg = *uninitialized*) /data/wordpress/htdocs/wordpress/wp-admin/admin-ajax$ php:101 [27-Jun-2017 09:12:36 UTC] PHP 3. WP_Hook->do_action($args = array (0 => '')) /data/wordpress/htdocs/wordpress/wp-includes/plugin.php:453 [27-Jun-2017 09:12:36 UTC] PHP 4. WP_Hook->apply_filters($value = '', $args = array (0 => '')) /data/wordpress/htdocs/wordpress/wp-includes/class-wp-hook.php: 323 [27-Jun-2017 09:12:36 UTC] PHP 5. wplf_ajax_submit_handler('') /data/wordpress /htdocs/wordpress/wp-includes/class-wp-hook.php:298 [27-Jun-2017 09:12:36 UTC] PHP 6. wp_get_attachment_url($post_id = class WP_Er ror { public $errors = array ('upload_error' => array (...)); public $error_data = array () }) /data/wordpress/htdocs/wp-content/plugins/wp-libre-form/inc/wplf- ajax.php:68
Looks like a typo
Yep, most definitely.
Fixed that and added a check for is_wp_error.
Today while crawling through the logs, I found these:
https://github.com/anttiviljami/wp-libre-form/blob/master/inc/wplf-form-actions.php#L77 https://github.com/anttiviljami/wp-libre-form/blob/master/inc/wplf-form-actions.php#L84
AFAIK there's no $attachment defined anywhere and that results in a notice.
I also spotted this stack trace that probably has something to do with this: