Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • I ISPConfig 3
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 590
    • Issues 590
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 49
    • Merge requests 49
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ISPConfig
  • ISPConfig 3
  • Issues
  • #4425
Closed
Open
Issue created Jan 09, 2017 by Ben Johnson@cbj4074

Variable is initialized as string but later written to as array, throws fatal error in PHP 7.1

I'm putting ISPConfig through the paces with PHP 7.1 (released as stable on Dec 01, 2016) and there is a change that causes PHP to throw a fatal error in at least one instance:

Fatal error: Uncaught Error: [] operator not supported for strings in /usr/local/ispconfig/interface/lib/classes/listform_actions.inc.php:138

interface/lib/classes/listform_actions.inc.php:134

The offending code looks like this:

		$records_new = '';
		if(is_array($records)) {
			$this->idx_key = $app->listform->listDef["table_idx"];
			foreach($records as $rec) {
				$records_new[] = $this->prepareDataRow($rec);
			}
		}

That first line needs to be changed to $records_new = [];.

Assignee
Assign to
Time tracking