# WebhookBundle/Controller/AjaxController.php  - strpos(): Empty needle

**URL:** https://forum.mautic.org/t/webhookbundle-controller-ajaxcontroller-php-strpos-empty-needle/8594
**Category:** Product Support
**Created:** [May 26, 2017, 9:23pm UTC](https://forum.mautic.org/t/webhookbundle-controller-ajaxcontroller-php-strpos-empty-needle/8594 "2017-05-26T21:23:33Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![LucasDavros](https://avatars.discourse-cdn.com/v4/letter/l/bc79bd/32.png) [@LucasDavros](https://forum.mautic.org/u/LucasDavros)
#### Post date: [May 26, 2017, 9:23pm UTC](https://forum.mautic.org/t/webhookbundle-controller-ajaxcontroller-php-strpos-empty-needle/8594/1 "2017-05-26T21:23:33Z")

</div>

Hi  
  
  
  
I use to find most answers on the problems i get it to, but this one i have not find any answer on, so i hope that somebody know what can be wrong.  
  
  
  
My main problem is that i send my mail with sparkpost, and that go well. I have made a webhook but the information do not coming in to mautic, i have made cronjobs and the answer is that is nothing in there.  
  
I did check the log file and did find this.  
  
  
  
[2017-05-26 05:07:32] mautic.WARNING: PHP Warning - strpos(): Empty needle - in file /public\_html/mautic/app/bundles/WebhookBundle/Controller/AjaxController.php - at line 105 [] []  
  
  
  
And when i then look in to ajaxcontroller.php.  
  
I see this:  
  
  
  
// if plugin is in first part of the string this is an addon  
  
// input is plugin.bundlename or mautic.bundlename  
  
if (strpos(‘plugin.’, $prefix)) {  
  
$payloadPath = $this-\>factory-\>getSystemPath(‘plugins’, true);  
  
}  
  
  
  
  
  
  
  
Line 105 is this line ---- \> if (strpos(‘plugin.’, $prefix)) {  
  
  
  
I think i have understand so much its something that is missing but do not know what.  
  
Hope there is one that is better then me on this ![:)]( ":)")

---

<div class="post-metadata">

### Author: ![LucasDavros](https://avatars.discourse-cdn.com/v4/letter/l/bc79bd/32.png) [@LucasDavros](https://forum.mautic.org/u/LucasDavros)
#### Post date: [May 26, 2017, 9:23pm UTC](https://forum.mautic.org/t/webhookbundle-controller-ajaxcontroller-php-strpos-empty-needle/8594/2 "2017-05-26T21:23:33Z")

</div>

Hi

I use to find most answers on the problems i get it to, but this one i have not find any answer on, so i hope that somebody know what can be wrong.

My main problem is that i send my mail with sparkpost, and that go well. I have made a webhook but the information do not coming in to mautic, i have made cronjobs and the answer is that is nothing in there.  
I did check the log file and did find this.

[2017-05-26 05:07:32] mautic.WARNING: PHP Warning - strpos(): Empty needle - in file /public\_html/mautic/app/bundles/WebhookBundle/Controller/AjaxController.php - at line 105 [] []

And when i then look in to ajaxcontroller.php.  
I see this:

```
// if plugin is in first part of the string this is an addon
        // input is plugin.bundlename or mautic.bundlename
        if (strpos('plugin.', $prefix)) {
            $payloadPath = $this->factory->getSystemPath('plugins', true);
        }

```

Line 105 is this line ---- \> if (strpos(‘plugin.’, $prefix)) {

I think i have understand so much its something that is missing but do not know what.  
Hope there is one that is better then me on this 🙂
