[In Progress] PHP 8.2 problem with OSTicket Awesome 1.18.3

    • February 13, 2026 at 2:39 pm #24959
      M
      Mike Riley
      Participant

      Hi, I recently rebuilt another osticket awesome with 1.18.2 and PHP 8.1 and  it works fine. I grabbed 1.18.3 for this second server rebuild and was forced to update to PHP 8.2. After  the update the admin page myserverurl/scp/login.php is blank and element inspection shows the index can’t be loaded. This is a Rocky Linux 9.6 server with Apache loading osticket. 

      /var/log/php-fpm/www-error.log says this:

      thrown in /var/www/html/osticket/include/class.forms.php on line 1167
      [13-Feb-2026 22:30:53 UTC] PHP Fatal error: Uncaught Error: Class name must be a valid object or a string in /var/www/html/osticket/include/class.forms.php:1167
      Stack trace:
      #0 /var/www/html/osticket/include/class.dynamic_forms.php(650): FormField->getImpl()
      #1 /var/www/html/osticket/include/class.dynamic_forms.php(1398): DynamicFormField->__call()
      #2 /var/www/html/osticket/include/class.dynamic_forms.php(165): DynamicFormEntry::create()
      #3 /var/www/html/osticket/include/class.dynamic_forms.php(297): DynamicForm->instanciate()
      #4 /var/www/html/osticket/include/class.dynamic_forms.php(532): DynamicForm::getNewInstance()
      #5 /var/www/html/osticket/include/class.ticket.php(2394): TicketForm::getInstance()
      #6 /var/www/html/osticket/include/class.queue.php(353): Ticket::getSearchableFields()
      #7 /var/www/html/osticket/include/class.queue.php(319): CustomQueue::getSearchableFields()
      #8 /var/www/html/osticket/include/class.queue.php(967): CustomQueue->getSupportedMatches()
      #9 /var/www/html/osticket/include/class.queue.php(901): CustomQueue->mangleQuerySet()
      #10 /var/www/html/osticket/include/class.queue.php(914): CustomQueue->getBasicQuery()
      #11 /var/www/html/osticket/scp/tickets.php(557): CustomQueue->getQuery()
      #12 /var/www/html/osticket/scp/index.php(17): require(‘…’)

      The file in question around line 1167 is this:

      This function:

      1163 function getImpl($parent=null) {
      1164 // Allow registration with ::addFieldTypes and delayed calling
      1165 $type = static::getFieldType($this->get(‘type’));
      1166 $clazz = $type[1];
      1167 $inst = new $clazz($this->ht);
      1168 $inst->parent = $parent;
      1169 $inst->setForm($this->_form);
      1170 return $inst;
      1171 }

      I suppose I can just download 1.18.2 and use it with php 8.1 because I know it works, but I thought I’d post here first and see if I can get a quick resolution. 

       

      Thank you. 

    • February 13, 2026 at 11:14 pm #24967
      stevland
      Keymaster

      Hi, Mike.

      Thanks for posting and for the detailed error log. That makes diagnosing this much easier.

      First, an important clarification: this is a core osTicket issue, not an osTicket Awesome issue.

      The entire stack trace points to include/class.forms.php and include/class.dynamic_forms.php, which are unmodified upstream osTicket files. You would see this exact same error on a vanilla osTicket installation. I’m happy to offer some pointers as a courtesy, but our forum isn’t the ideal place to get sustained support on core osTicket issues.

      A quick tip for future troubleshooting: press SHIFT+O on any page in osTicket Awesome to instantly switch to vanilla osTicket. If the problem still occurs, you know it’s a core issue. If it goes away, then it’s something we’ve introduced (which is rare, but we always want to know about it). You can also look at the file paths in any stack trace; if none of them reference osTA-tagged code, it’s upstream.

      For core issues like this, the best places to get help are:

      osTicket Community Forum: https://forum.osticket.com — The development team and a large community monitor this forum.
      GitHub Issues: https://github.com/osTicket/osTicket/issues — For confirmed bugs. In fact, this issue from 2014 shows the exact same error pattern in class.forms.php, which illustrates how long this class of bug has existed in the core codebase.
      These resources have a much larger pool of people experienced with core osTicket internals than we have here.

      That said, here’s what I think is going on:

      The error means a form field in your database has a type value that doesn’t map to any registered field class. When the admin panel loads, it builds the ticket queue by iterating all searchable form fields. When it hits a field with an unrecognized or empty type, it crashes at that new $clazz(...) line because $clazz ends up null.

      Since you mentioned rebuilding the server, I’m guessing you imported your database from the previous installation. The most common causes are:

      A plugin on your old server registered a custom field type, and that plugin isn’t installed on the new server yet.
      A form field ended up with an empty or NULL type value (data corruption, incomplete migration, etc.).
      To diagnose, run this against your osTicket database (adjust the table prefix if yours isn’t the default ost_):

       
      SELECT id, form_id, type, name, label
      FROM ost_form_field
      WHERE type IS NULL
      OR type = ''
      OR type NOT IN ('text','memo','thread','datetime','phone','bool','choices','break','section','info','list','typehead','priority');

      That list of valid types may not be exhaustive, but it will surface any obvious outliers. If you find a field with an unexpected or empty type, that’s your culprit. You can either correct the type to something valid or, if the field isn’t in use, remove the row.

      One more thing about your fallback plan: downgrading to 1.18.2 with PHP 8.1 probably won’t help here. This error (Class name must be a valid object or a string) is a PHP Fatal that would occur on any PHP version when $clazz is null. Your other server works fine most likely because it’s running against a clean database, not because of the version difference. In other words, the problem is in your data, not in the code or PHP version. Dropping back to 1.18.2 would just be delaying the inevitable.

      Hope that helps point you in the right direction. If the SQL query doesn’t turn anything up, feel free to follow up here and I’ll try to dig a bit deeper time permitting, but as I mentioned your best bet for deep troubleshooting on core internals is the osTicket forum or GitHub.

You must be logged in to reply to this topic.