Skip to content

Incorrect error "undefined method" messages #16574

Closed

Description

@YuanchengJiang

Description

The following code:

<?php
$i = new ArrayIterator(array(1,1,1,1,1));
$i = new CachingIterator($i,CachingIterator::FULL_CACHE);
$fusion = $i;
$fusion->load("x");
?>

Resulted in this output:

Fatal error: Uncaught Error: Call to undefined method ArrayIterator::load()

But I expected this output instead (JIT 1215):

Fatal error: Uncaught Error: Call to undefined method CachingIterator::load()

PHP Version

nightly

Operating System

ubuntu 22.04

Activity

  1. ndossche commented on Oct 24, 2024

    @ndossche
    Member

    It's related to get_method being able to change the object, I think we should be using orig_obj... So this is also SPL-related as SPL changes the object pointer.

  2. self-assigned this
    on Oct 24, 2024
  3. added a commit that references this issue on Oct 24, 2024
    adb8c40
  4. added a commit that references this issue on Oct 25, 2024
    e9283c0
  5. added a commit that references this issue on Oct 25, 2024
    0b3684c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions