parent
2a74c4d82f
commit
eac68cdf50
|
@ -78,7 +78,11 @@ class WC_Log_Handler_DB extends WC_Log_Handler {
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( ! empty( $context ) ) {
|
if ( ! empty( $context ) ) {
|
||||||
$insert['context'] = serialize( $context ); // @codingStandardsIgnoreLine.
|
try {
|
||||||
|
$insert['context'] = serialize( $context ); // @codingStandardsIgnoreLine.
|
||||||
|
} catch ( Exception $e ) {
|
||||||
|
$insert['context'] = 'There was an error while serializing the context: ' . $e->getMessage();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false !== $wpdb->insert( "{$wpdb->prefix}woocommerce_log", $insert, $format );
|
return false !== $wpdb->insert( "{$wpdb->prefix}woocommerce_log", $insert, $format );
|
||||||
|
|
Loading…
Reference in New Issue