IBM Support

Developer Portal throws PHP Fatal error due to issue with defining $title

Troubleshooting


Problem

Users might see an error like the following in the portal-www pod:

"
PHP message: PHP Fatal error: Type of Drupal\ibm_apim\Updater\ApicModule::$title must not be defined (as in class Drupal\Core\Updater\Updater) in /web/platforms/devportal-9.x-10.0.1.11-20230207-1645/modules/ibm_apim/src/Updater/ApicModule.php on line 22

Drupal 9.5 updated to add title to the Update file (https://github.com/drupal/drupal/blob/9.5.x/core/lib/Drupal/Core/Updater/Updater.php#L35) and PHP doesn't allow users to redefine in API Connect 10.0.1.

 The file /web/platforms/<platform>/modules/ibm_apim/src/Updater/ApicModule.php declares the title like the following:

 /**

  * @var string|null

  */

 public ?string $title = NULL;

This code causes issues as the update file cannot update the title due to the limitations with PHP.

Symptom

Affected users might see errors like this when they try actions on the Developer Portal. One example where this issue can be observed is when a user tries to upload a custom Theme.

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB77","label":"Automation Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSMNED","label":"IBM API Connect"},"ARM Category":[{"code":"a8m0z000000cvaRAAQ","label":"API Connect-\u003EDeveloper Portal (MM)-\u003ECustom Modules"}],"ARM Case Number":"TS012866011","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"10.0.1"}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
03 May 2023

UID

ibm16988037