Ignore:
Timestamp:
Nov 19, 2013, 4:41:05 PM (10 years ago)
Author:
mistic100
Message:

feature 2998: Warning: Parameter 3 to theme_activate() expected to be a reference, value given
unable to pass references through func_get_args and call_user_func_array

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/themes.class.php

    r25406 r25577  
    3030  function activate($theme_version, &$errors=array())
    3131  {
    32     return $this->__call(__FUNCTION__, func_get_args());
     32    if (is_callable('theme_activate'))
     33    {
     34      return theme_activate($this->theme_id, $theme_version, $errors);
     35    }
    3336  }
    3437  function deactivate()
    3538  {
    36     return $this->__call(__FUNCTION__, func_get_args());
     39    if (is_callable('theme_deactivate'))
     40    {
     41      return theme_deactivate($this->theme_id);
     42    }
    3743  }
    3844  function delete()
    3945  {
    40     return $this->__call(__FUNCTION__, func_get_args());
    41   }
    42 
    43   function __call($name, $arguments)
    44   {
    45     if (is_callable('theme_'.$name))
    46     {
    47       array_unshift($arguments, $this->theme_id);
    48       return call_user_func_array('theme_'.$name, $arguments);
    49     }
    50     return null;
     46    if (is_callable('theme_delete'))
     47    {
     48      return theme_delete($this->theme_id);
     49    }
    5150  }
    5251}
Note: See TracChangeset for help on using the changeset viewer.