File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -740,7 +740,17 @@ public static final function get_features_for_license( $plan ) {
740
740
*/
741
741
public static function get_chart_data ( $ chart , $ type , $ run_filter = true ) {
742
742
// change HTML entities
743
- $ data = unserialize ( html_entity_decode ( htmlentities ( $ chart ->post_content ) ) );
743
+ $ post_content = html_entity_decode ( htmlentities ( $ chart ->post_content ) );
744
+ $ post_content = preg_replace_callback (
745
+ '!s:(\d+):"(.*?)";!s ' ,
746
+ function ( $ matches ) {
747
+ if ( isset ( $ matches [2 ] ) ) {
748
+ return 's: ' . strlen ( $ matches [2 ] ) . ':" ' . $ matches [2 ] . '"; ' ;
749
+ }
750
+ },
751
+ $ post_content
752
+ );
753
+ $ data = unserialize ( $ post_content );
744
754
$ altered = array ();
745
755
if ( ! empty ( $ data ) ) {
746
756
foreach ( $ data as $ index => $ array ) {
You can’t perform that action at this time.
0 commit comments