Skip to content

Double cast of NullToStrictStringFuncCallArgRector #9545

@jorgsowa

Description

@jorgsowa

Bug Report

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

Minimal PHP Code Causing Issue

See https://getrector.com/demo/c96ef6c0-7fad-444f-9fb8-5941280101fd

<?php

explode(',',
(string) $getInstance->get()
	? $_SERVER['REMOTE_ADDR']
	: $_SERVER['HTTP_X_FORWARDED_FOR'] ?? '',
);

Responsible rules

  • NullToStrictStringFuncCallArgRector

Expected Behavior

No change. Double cast shouldn't be added.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions