hookpress icon indicating copy to clipboard operation
hookpress copied to clipboard

Blank mutliselect fields after selecting actions or filters --ereg() deprecated PHP7.0..

Open XPERTPCNET opened this issue 8 years ago • 1 comments

When adding a Webhook, no fields items are displaying after selecting actions or filters .

The following error is logged:

PHP Fatal error: Uncaught Error: Call to undefined function ereg() in /path/wp-content/plugins/hookpress/services.php:13

Two possible solutions:

Solution 1 // changing the deprecated ereg() function to mb_ereg() from: if (ereg('[A-Z]+',$arg))
to: if (mb_ereg('[A-Z]+',$arg))

Solution 2 (seems to be more recommended):

// changing the deprecated ereg() function to preg_match() from: if (ereg('[A-Z]+',$arg))
to: if (preg_match('/[A-Z]+/',$arg))

XPERTPCNET avatar Jun 05 '16 17:06 XPERTPCNET

Same problem with split function

oltodo avatar Oct 04 '16 18:10 oltodo