Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #38103


Ignore:
Timestamp:
09/20/2016 08:11:11 AM (10 years ago)
Author:
swissspidy
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #38103 – Description

    initial v1  
    99The error happens inside the function _backup_hooks, on this line:
    1010
     11{{{
    1112self::$hooks_saved['wp_filter'][ $hook_name ] = clone $hook_object;
     13}}}
    1214
    13 I tried to trace out the $hook_object variable, and it is an array. In this case it looks like this:
     15I tried to trace out the `$hook_object` variable, and it is an array. In this case it looks like this:
    1416
     17{{{
    1518Array
    1619(
     
    2629
    2730)
     31}}}
    2832
    2933So, it is an array, and not an object, and I guess that's why clone doesn't work. I'm using PHP 7.0.8-0ubuntu0.16.04.2. Last time I ran the tests it was on a PHP 5.something version, so I also guess this could have something to do with PHP 7 being stricter about objects/arrays when using clone.