Skip to content

Incorrect behavior of IssetOnPropertyObjectToPropertyExistsRector #6630

@enumag

Description

@enumag

Bug Report

Subject Details
Rector version last dev-master
Installed as composer dependency

Minimal PHP Code Causing Issue

See https://getrector.org/demo/1ebfb663-df6b-697c-ac22-45396c070a76

<?php

declare(strict_types = 1);

function x(stdClass $x) {
	if (isset($x->property)) {
        
    }
}

Responsible rules

  • IssetOnPropertyObjectToPropertyExistsRector

Expected Behavior

The "fixed" code will trigger

PHP Notice:  Undefined property: stdClass::$property in ...

if the property doesn't exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions