Jump to content

Haystack error when opening tickets (occassionally)


pKris

Recommended Posts

Hey all!

We recently upgraded to WHMCS 8.6, and all is well except for a few issues.

Occasionally a ticket will throw an error when opening it, this ticket could be brand-new or days old with many replies in it:

TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in /var/www/html/ponyboy/supporttickets.php:0
Stack trace:
#0 /var/www/html/ponyboy/supporttickets.php(0): in_array()
#1 {main}\]

I can still access the ticket via the WHMCS mobile app, it's just the browser that complains.

Link to comment
Share on other sites

  • 2 weeks later...
1 minute ago, DennisHermannsen said:

Are you able to reproduce the error by doing specific steps? Giving all information possible will most likely result in a quick fix from WHMCS.

 

Sadly no, it is an issue that may happen once in a blue moon - we could have a ticket open with a customer and be communicating back and forth on it for days when all of the sudden this pops up.

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 months later...

Hello

I am running 8.6.1 and also just got this error:

 

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

  pipe to |/home/user/WHMCS/crons/pipe.php
    generated by email@addressexample.co 
    local delivery failed

The following text was generated during the delivery attempt:

------ pipe to |/home/user/WHMCS/crons/pipe.php
       generated by email@addressexample.co  ------

TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in /home/user/public_html/whmcs/includes/ticketfunctions.php:0

#0 /home/user/public_html/whmcs/includes/ticketfunctions.php(0): in_array('Closed', NULL)
#1 /home/user/WHMCS/crons/pipe.php(0): processPipedTicket('email@addressexam...., 'email user name .', 'Re: [Ticket ID:...', 'Hi  there\n\nWednes...', '733731_SM-Logo....', Object(WHMCS\Mail\AutoSubmittedHeader), Array)
#2 {main}

 

 

 

 

Link to comment
Share on other sites

  • 3 months later...

Hello there

Sorry for reviving this post

This happened to me recently with WHMCS 8.7.3 and PHP 8.1

It happened when a user opened a ticket through an email and between the round trip emails they added 2 people from the organization to the ticket and that is when the error appeared.
Whenever the recipient of the email is more than one person and does not have permissions in the ticket, whmcs throws me the error.
To solve it, we proceeded to register the 2 people of the organization as part of support and with permissions in the ticket office.

After that I stop throwing errors and I manage to import the emails correctly.
Another problem that this generated is that every time the email piping cron was executed, it imported again the same emails that were throwing an error.

Hope this can help someone experiencing the same thing

Email Import Log:
image.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated