Skip to content
This repository has been archived by the owner on May 15, 2021. It is now read-only.

PHP 7.4 issue #4

Closed
codeclinic opened this issue Aug 11, 2020 · 17 comments
Closed

PHP 7.4 issue #4

codeclinic opened this issue Aug 11, 2020 · 17 comments
Labels
bug Something isn't working
Milestone

Comments

@codeclinic
Copy link
Collaborator

There is an issue with TF at php 7.4

Trying to access array offset on value of type null in... titan-framework/lib/class-admin-page.php on line 78

So it's

$settings['parent'] = $this->settings['id'];

at function

public function createAdminPanel( $settings ) { $settings['parent'] = $this->settings['id']; return $this->owner->createAdminPanel( $settings ); }

See: gambitph#427

@goodwinpress
Copy link

goodwinpress commented Aug 11, 2020

I've got the solution, by the way.

In titan-framework/lib/class-admin-page.php, line 19, change

public $settings;

to

public $settings = array();

and then change at lines 77 and 83

$settings['parent'] = $this->settings['id'];

to

$settings['parent'] = $this->settings['id'] ?? null;

Hope this helps someone.

@codeclinic
Copy link
Collaborator Author

@goodwinpress If you could create pull request for this it would be a great help. Thanks.

@davidsneighbour davidsneighbour added the bug Something isn't working label Aug 12, 2020
@davidsneighbour davidsneighbour added this to the 2.0.0 milestone Aug 12, 2020
@davidsneighbour
Copy link
Owner

Those line numbers aren't right, but I added a PR for this. Have a look and let me know if this fixes the issue.

@goodwinpress
Copy link

Yes, all correct.

@davidsneighbour
Copy link
Owner

fixed in #dc8fbcc

@davidsneighbour
Copy link
Owner

@all-contributors

add @davidsneighbour for bug,code,content,data,doc,design,ideas,infra,maintenance,projectManagement,question,review,security,test
add @codeclinic for bug,ideas,question
add @goodwinpress for bug,code

@allcontributors
Copy link

@davidsneighbour

I could not determine your intention.

Basic usage: @all-contributors please add @Someone for code, doc and infra

For other usages see the documentation

@davidsneighbour
Copy link
Owner

bear with me ;)

@all-contributors add @davidsneighbour for bug,code,content,data,doc,design,ideas,infra,maintenance,projectManagement,question,review,security,test
@all-contributors add @codeclinic for bug,ideas,question
@all-contributors add @goodwinpress for bug,code

@allcontributors
Copy link

@davidsneighbour

I could not determine your intention.

Basic usage: @all-contributors please add @Someone for code, doc and infra

For other usages see the documentation

@davidsneighbour
Copy link
Owner

@all-contributors please add @davidsneighbour for bug, code, content, data, doc, design, ideas, infra, maintenance, projectManagement, question, review, security and test

@all-contributors please add @codeclinic for bug, ideas and question

@all-contributors please add @goodwinpress for bug and code

@allcontributors
Copy link

@davidsneighbour

I could not determine your intention.

Basic usage: @all-contributors please add @Someone for code, doc and infra

For other usages see the documentation

@davidsneighbour
Copy link
Owner

@all-contributors please add @davidsneighbour for bug, code, content, data, doc, design, ideas, infra, maintenance, projectManagement, question, review, security and test

@allcontributors
Copy link

@davidsneighbour

I've put up a pull request to add @davidsneighbour! 🎉

@davidsneighbour
Copy link
Owner

@all-contributors please add @codeclinic for bug, ideas and question

@allcontributors
Copy link

@davidsneighbour

I've put up a pull request to add @codeclinic! 🎉

@davidsneighbour
Copy link
Owner

@all-contributors please add @goodwinpress for bug and code

@allcontributors
Copy link

@davidsneighbour

I've put up a pull request to add @goodwinpress! 🎉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants