Skip to content

[bug]: PHP 8.2 Fatal Error in superfecta_base.php #989

@afonsolaw

Description

@afonsolaw

FreePBX Version

FreePBX 17

Issue Description

Module: Superfecta 17.0.5
FreePBX Version: 17
PHP Version: 8.2.29
Severity: High — causes fatal crash when Whoops error handler is active
Summary:
superfecta_base.php line 1046 uses deprecated ${var} string interpolation syntax which PHP 8.2 treats as a deprecation notice. FreePBX 17's Whoops error handler escalates this to a fatal exception, crashing Superfecta silently.
Affected Line:
php$this->DebugPrint("Unknown Country Code ${country} passed to IsValidNumber: ${country}");
Fix:
php$this->DebugPrint("Unknown Country Code {$country} passed to IsValidNumber: {$country}");
Steps to Reproduce:

FreePBX 17, PHP 8.2
Call execute() in debug mode with a number that hits the default country code switch case
Observe fatal Whoops exception

Operating Environment

Freepbx 17

Relevant log output

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtriageTriage

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions