Illegal string offset warning
-
Hi! On creating a new product I see the following error:
Warning: Illegal string offset ‘expires’ in wp-content/plugins/ithemes-exchange/lib/product-features/class.downloads.php on line 428
This is the relevant code:
$meta = get_post_meta( $product_id, '_it-exchange-download-meta', true ); if ( 'limit' == $options['setting'] ) { $meta['download-limit'] = $new_value; } else if ( 'expires' == $options['setting'] ) { $meta['expires'] = (boolean) $new_value; } else if ( 'expire-int' == $options['setting'] ) { $meta['expire-int'] = $new_value; } else if ( 'expire-units' == $options['setting'] ) { $meta['expire-units'] = $new_value; }However, at least for new products
$metamay actually be a string, rather than an array, triggering this error/warning.Be great to clean it up if possible!
(WP 4.8.1/PHP 7.1)
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Illegal string offset warning’ is closed to new replies.