# Change data inside file object?

**URL:** <https://forum.getkirby.com/t/change-data-inside-file-object/1618>\
**Category:** Questions\
**Tags:** v2\
**Created:** [July 15, 2015, 5:27am UTC](https://forum.getkirby.com/t/change-data-inside-file-object/1618 "2015-07-15T05:27:45Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![jenstornell](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jenstornell/32/546_2.png) [@jenstornell](https://forum.getkirby.com/u/jenstornell)\
**Post date:** [July 18, 2015, 9:25pm UTC](https://forum.getkirby.com/t/change-data-inside-file-object/1618/7 "2015-07-18T21:25:43Z")

</div>

I still try to merge the two objects together but still no luck. What is wrong?

```php
class Foo {
    function test() {
      return 'whatever';
    }
}

$foo = new Foo;

$new_object = (object) array_merge((array) $foo, (array) $page);

echo $new_object->title();

```

The error message is

```
Fatal error: Call to undefined method stdClass::title()
```

---

_[View the full topic](https://forum.getkirby.com/t/change-data-inside-file-object/1618)._
