Errors on hook creation
Hello. On creation of a new hook, two errors are generated. (wp 4.4.1, php 5.4.45)
This is the first: Deprecated: Function split() is deprecated in /home/devredpupmedia/public_html/client/brand/wp-content/plugins/hookpress/services.php on line 60
I was able to resolve it by editing line 60 in /services.php as follows:
'fields'=>explode(',',$_POST['fields']),
Also edited line 49 in the same file with the same edit.
The second: Strict Standards: Only variables should be passed by reference in /home/devredpupmedia/public_html/client/brand/wp-content/plugins/hookpress/hookpress.php on line 68 edit_post
I was able to resolve it by editing line 68 in /hookpress.php as follows:
$tmp = array_keys($webhooks);
return end($tmp);
I'm not polished in PHP so I'm asking if these changes are acceptable for use in the plugin. Thanks
Thank you; yes I think they look right. And I assume hooks have been working well for you again once these changes were in place?
I'm curious — did you recently add HookPress and run into these issues or did you upgrade the PHP on your server or something?
Wonderful.
Yes, hooks worked after these edits (tested hooks on zapier.com with success).
Recently installed HookPress, I did not test on other PHP versions. Found it via Zapier instructions for WordPress. Works great! We are planning to add some custom fields but the rest is perfect.
Ok thank you. If you are familiar with GitHub, please submit a Pull Request with these changes so you will be credited with the commit. Otherwise I can make the changes. Then I will bundle and submit to wordpress.org.
Thanks - this is all you. I'm not on GitHub enough to not screw it up :)