Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors on hook creation #13

Open
redpupmedia opened this issue Jan 21, 2016 · 4 comments
Open

Errors on hook creation #13

redpupmedia opened this issue Jan 21, 2016 · 4 comments

Comments

@redpupmedia
Copy link

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

@mitcho
Copy link
Owner

mitcho commented Jan 21, 2016

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?

@redpupmedia
Copy link
Author

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.

@mitcho
Copy link
Owner

mitcho commented Jan 21, 2016

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.

@redpupmedia
Copy link
Author

Thanks - this is all you. I'm not on GitHub enough to not screw it up :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants