Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.756.2.60 diff -u -p -r1.756.2.60 common.inc --- includes/common.inc 21 Jul 2009 08:59:10 -0000 1.756.2.60 +++ includes/common.inc 25 Jul 2009 18:54:23 -0000 @@ -25,6 +25,13 @@ define('SAVED_UPDATED', 2); define('SAVED_DELETED', 3); /** + * Create E_DEPRECATED constant for older PHP versions (<5.3). + */ +if (!defined('E_DEPRECATED')) { + define('E_DEPRECATED', 8192); +} + +/** * Set content for a specified region. * * @param $region @@ -589,7 +596,7 @@ function drupal_error_handler($errno, $m return; } - if ($errno & (E_ALL)) { + if ($errno & (E_ALL ^ E_DEPRECATED)) { $types = array(1 => 'error', 2 => 'warning', 4 => 'parse error', 8 => 'notice', 16 => 'core error', 32 => 'core warning', 64 => 'compile error', 128 => 'compile warning', 256 => 'user error', 512 => 'user warning', 1024 => 'user notice', 2048 => 'strict warning', 4096 => 'recoverable fatal error'); // For database errors, we want the line number/file name of the place that Index: includes/file.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/file.inc,v retrieving revision 1.121.2.7 diff -u -p -r1.121.2.7 file.inc --- includes/file.inc 9 Jun 2009 10:37:38 -0000 1.121.2.7 +++ includes/file.inc 25 Jul 2009 18:54:24 -0000 @@ -550,6 +550,8 @@ function file_save_upload($source, $vali $errors = array(); foreach ($validators as $function => $args) { array_unshift($args, $file); + // Make sure $file is passed around by reference. + $args[0] = &$file; $errors = array_merge($errors, call_user_func_array($function, $args)); } Index: includes/form.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/form.inc,v retrieving revision 1.265.2.25 diff -u -p -r1.265.2.25 form.inc --- includes/form.inc 26 May 2009 08:18:46 -0000 1.265.2.25 +++ includes/form.inc 25 Jul 2009 18:54:26 -0000 @@ -292,6 +292,10 @@ function form_get_cache($form_build_id, */ function drupal_execute($form_id, &$form_state) { $args = func_get_args(); + + // Make sure $form_state is passed around by reference. + $args[1] = &$form_state; + $form = call_user_func_array('drupal_retrieve_form', $args); $form['#post'] = $form_state['values']; drupal_prepare_form($form_id, $form, $form_state); Index: modules/system/system.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v retrieving revision 1.63.2.8 diff -u -p -r1.63.2.8 system.admin.inc --- modules/system/system.admin.inc 9 Jun 2009 10:58:09 -0000 1.63.2.8 +++ modules/system/system.admin.inc 25 Jul 2009 18:54:27 -0000 @@ -1971,7 +1971,7 @@ function theme_system_admin_by_module($m * An array of requirements. * @ingroup themeable */ -function theme_status_report(&$requirements) { +function theme_status_report($requirements) { $i = 0; $output = ''; foreach ($requirements as $requirement) { Index: modules/upload/upload.module =================================================================== RCS file: /cvs/drupal/drupal/modules/upload/upload.module,v retrieving revision 1.197.2.4 diff -u -p -r1.197.2.4 upload.module --- modules/upload/upload.module 12 Jan 2009 15:30:23 -0000 1.197.2.4 +++ modules/upload/upload.module 25 Jul 2009 18:54:27 -0000 @@ -513,7 +513,7 @@ function _upload_form($node) { * * @ingroup themeable */ -function theme_upload_form_current(&$form) { +function theme_upload_form_current($form) { $header = array('', t('Delete'), t('List'), t('Description'), t('Weight'), t('Size')); drupal_add_tabledrag('upload-attachments', 'order', 'sibling', 'upload-weight'); Index: modules/user/user.module =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.module,v retrieving revision 1.892.2.14 diff -u -p -r1.892.2.14 user.module --- modules/user/user.module 1 Jul 2009 20:51:56 -0000 1.892.2.14 +++ modules/user/user.module 25 Jul 2009 18:54:29 -0000 @@ -1605,7 +1605,7 @@ function user_delete($edit, $uid) { db_query('DELETE FROM {authmap} WHERE uid = %d', $uid); $variables = array('%name' => $account->name, '%email' => '<'. $account->mail .'>'); watchdog('user', 'Deleted user: %name %email.', $variables, WATCHDOG_NOTICE); - module_invoke_all('user', 'delete', $edit, $account); + user_module_invoke('delete', $edit, $account); } /** @@ -1929,8 +1929,12 @@ function user_help($path, $arg) { function _user_categories($account) { $categories = array(); + // Only variables can be passed by reference workaround. + $null = NULL; foreach (module_list() as $module) { - if ($data = module_invoke($module, 'user', 'categories', NULL, $account, '')) { + $function = $module .'_user'; + // $null and $account need to be passed by reference. + if (function_exists($function) && ($data = $function('categories', $null, $account, ''))) { $categories = array_merge($data, $categories); } } @@ -2468,8 +2472,10 @@ function user_register_validate($form, & function _user_forms(&$edit, $account, $category, $hook = 'form') { $groups = array(); foreach (module_list() as $module) { - if ($data = module_invoke($module, 'user', $hook, $edit, $account, $category)) { - $groups = array_merge_recursive($data, $groups); + $function = $module .'_user'; + // $edit and $account need to be passed by reference. + if (function_exists($function) && ($data = $function($hook, $edit, $account, $category))) { + $groups = array_merge($data, $groups); } } uasort($groups, '_user_sort'); Index: modules/user/user.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.pages.inc,v retrieving revision 1.11.2.1 diff -u -p -r1.11.2.1 user.pages.inc --- modules/user/user.pages.inc 8 Oct 2008 20:12:18 -0000 1.11.2.1 +++ modules/user/user.pages.inc 25 Jul 2009 18:54:29 -0000 @@ -148,7 +148,9 @@ function user_logout() { // Destroy the current session: session_destroy(); - module_invoke_all('user', 'logout', NULL, $user); + // Only variables can be passed by reference workaround. + $null = NULL; + user_module_invoke('logout', $null, $user); // Load the anonymous user $user = drupal_anonymous_user();