drvtch0091
Forum Replies Created
-
Forum: Plugins
In reply to: [Download Monitor] PHP errors in Ajax Response – Bug?PHP is not my strength, but I’ve highlighted the function code from DLM.php containing the error
/** * Add Theme Compatibility * * @access public * @return void */ public function compatibility() { // Post thumbnail support if ( ! current_theme_supports( 'post-thumbnails' ) ) { add_theme_support( 'post-thumbnails' ); remove_post_type_support( 'post', 'thumbnail' ); remove_post_type_support( 'page', 'thumbnail' ); } else { // Get current supported $current_support = get_theme_support( 'post-thumbnails' ); // fix current support for some themes if ( is_array( $current_support[0] ) ) { $current_support = $current_support[0]; } // This can be a bool or array. If array we merge our post type in, if bool ignore because it's like a global theme setting. if ( is_array( $current_support ) ) { add_theme_support( 'post-thumbnails', array_merge( $current_support, array( 'dlm_download' ) ) ); } add_post_type_support( 'download', 'thumbnail' ); } }
It looks like the indexing of
$current_support[0]
inif ( is_array( $current_support[0] ) )
is throwing the error since$current_support
is apparently a type bool in the current theme? I’ve referenced the block below..// fix current support for some themes if ( is_array( $current_support[0] ) ) { $current_support = $current_support[0]; }
Thanks
Forum: Plugins
In reply to: [Download Monitor] PHP errors in Ajax Response – Bug?Looks like I’m still having the same issue with plugin version 4.4.2.
Notice: Trying to access array offset on value of type bool in /wp-content/plugins/download-monitor/src/DLM.php on line 236
Probably the same issue as here : https://wordpress.org/support/topic/notice-trying-to-access-array-offset-on-value-of-type-bool-in/
Also getting a warning (maybe related to the error from line 236 above?)
Warning: Cannot modify header information – headers already sent by
(output started at /wp-content/plugins/download-monitor/src/DLM.php:236)
in /wp-includes/pluggable.php on line 1268Forum: Plugins
In reply to: [Download Monitor] PHP errors in Ajax Response – Bug?Sorry for the delay.
The plugin version is 4.4.2. I did not make any modifications to the plugin. I’m not seeing the error anymore so I suspect it had something to do with my browser cache perhaps..
Anyway, thank you for the reply. If it pops up again, I’ll try to provide details
I am delighted to receive this response. Thank you and your developer team for the helpful hints.
Oh, that’s completely understandable. Sadly, I considered myself as being a developer until this moment. I will continue in my personal struggles against PHP and AJAX with renewed stubbornness and foolishness! 🙂
Forum: Plugins
In reply to: [Download Monitor] Add new download via APINevermind, I found the info I needed by looking at the plugin code.
Forum: Plugins
In reply to: [Wordpress File Upload] variable name documentationThank you, sir 🙂
No problem and thanks for the reply. When modifying the theme, I can build the interface and get the handle of the specific file I wish to use as the printfile for the custom design. But I am not so sure how to integrate this with the plugin so that it uses this file. Are there variables I can override and set the printfile vs. using the file upload form? Thanks in advance
Forum: Plugins
In reply to: [Download Monitor] Add new download via APINo worries and this is understandable – it is an edge case and probably not worth the effort. I am trying to create a download and version programmatically and your documentation covers this for the most part. Any chance you have documented the attributes that can be get/set for the download and version objects? For example: setting
featured
ormembers only
attributes.Sorry for disappearing on you! I was able to get everything working and I appreciate your reply.
Nevermind, I see you destroy the
$phpmailer
at the end ofwp_mail_smtp_options_page
method. If I commented this out, would I be able to reference the global$phpmailer
with its settings and then override theto, body, etc.
fields from the form?