Drupal and php 5.3 Compatibility

I was upgrading my server the other day & had a couple of very old Drupal 4.7 sites and quite a few Drupal 5.23 sites which I wanted to keep working. I thought I was in for a right headache but it turned out to be surprisingly easy with the following patches:

Drupal 5 Compatibility patch
http://drupal.org/node/853064

Drupal 4
And these are the lines I replaced in my Drupal 4.7 install.

Line 498 : common.inc
if ($errno & (E_ALL & ~E_NOTICE & ~E_DEPRECATED)) { // replaced: if ($errno & (E_ALL ^ E_NOTICE)) {

Line 497 : user.module
function user_user($type, $edit, $user, $category = NULL) { // replaced: function user_user($type, $edit, $user, $category = NULL) {

Line 760 : node.module
function node_user($op, $edit, $user) { // replaced: function node_user($op, &$edit, &$user) {

Line 155 : system.module
function system_user($type, $edit, $user, $category = NULL) { // replaced: function system_user($type, $edit, &$user, $category = NULL) {

Line 67 : watchdog.module
function watchdog_user($op, $edit, $user) { // replaced: function watchdog_user($op, $edit, $user) {

Line 557 : block.module
function block_user($type, $edit, $user, $category = NULL) { // replaced: function block_user($type, $edit, &$user, $category = NULL) {

Line 77 : pathauto_user.inc
function pathauto_user($op, $edit, $user, $category=FALSE) { // replaced: function pathauto_user($op, &$edit, &$user, $category=FALSE) {

Line 151 : statistics.module
function statistics_user($op, &$edit, &$user) { // replaced: function statistics_user($op, &$edit, &$user) {

line 713 : upload.module
function theme_upload_form_current($form) { // tom replace : function theme_upload_form_current(&$form) {

Comments

Nice. Thanks for documenting

Nice. Thanks for documenting this!

Thanks! This helps me (D4.7

Thanks! This helps me (D4.7 on PHP 5.3) on this site: http://szentandras.ujevangelizacio.hu/

Post new comment

  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <h3> <h2> <h4> <img> <div> <table> <tr> <td> <pre>
  • Lines and paragraphs break automatically.
  • Insert image: [img:node_id align=(left|right) size=(|fullLA|fullPreview|fullSQ|halfLA|halfPO|halfSQ|thirdSQ) action=(popup|link|frame) url=url style="margin:10px;" title=text description=text]

More information about formatting options

 
info@theanthillsocial.co.uk XHTML 1.0 Strict CSS2 WAI