Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow dereferencing of non-objects accross all supported PHP versions #832

Merged
merged 1 commit into from
Nov 24, 2022

Conversation

wisskid
Copy link
Contributor

@wisskid wisskid commented Nov 24, 2022

Fixes #831

@wisskid wisskid merged commit a34ee98 into master Nov 24, 2022
@rudiedirkx
Copy link

I have no idea what DereferencingNonObjects is, so I would put all those error suppression in the same config, but sure, this works 👍

@rudiedirkx
Copy link

What about

class Foo {}
$smarty->assign('object', new Foo);
====
{{$object->name}}

? Is that caught too? A non-existing property of a valid object? Or a protected/private property of an object, which is probably a different message:

class Foo {
  protected $name = 'Bar';
}
$smarty->assign('object', new Foo);
====
{{$object->name}}

@wisskid wisskid deleted the feature/dereferencing_of_non_objects branch January 26, 2023 11:58
@wisskid wisskid restored the feature/dereferencing_of_non_objects branch August 6, 2023 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dereferencing of non-object triggers E_WARNING in php >= 8.0
2 participants