Both updates 7301 and 7302 throw a fatal error: Only variables can be passed by reference
PHP Version 5.3.2

Changing

function services_update_7301() {
  db_add_field('services_endpoint', 'debug', array('type' => 'int', 'not null' => TRUE, 'default' => 0));
  db_add_field('services_endpoint', 'status', array('type' => 'int', 'not null' => TRUE, 'default' => 1));
}

to

function services_update_7301() {
  $table = 'services_endpoint';
  db_add_field($table, 'debug', array('type' => 'int', 'not null' => TRUE, 'default' => 0));
  db_add_field($table, 'status', array('type' => 'int', 'not null' => TRUE, 'default' => 1));
}

and same for 7302 fixes the issue.

CommentFileSizeAuthor
#1 pass-by-reference-1108470-1.patch993 bytessanduhrs

Comments

sanduhrs’s picture

Status: Active » Needs review
StatusFileSize
new993 bytes

Patch attached.

sanduhrs’s picture

Status: Needs review » Closed (works as designed)

Messed up some code.
Sorry for the inconvenience.

skyredwang’s picture

Title: Fatal error in hook_update(): Only variables can be passed by reference » Fatal error in hook_update():
Priority: Normal » Critical
Status: Closed (works as designed) » Active

I also encountered the problems with 7301, but my error msg was:

DatabaseSchemaObjectDoesNotExistException: Cannot add field services_endpoint.debug: table doesn't exist. in DatabaseSchema_mysql->addField() (line 321 of /srv/www/beta.digitalrhino.net/public_html/includes/database/mysql/schema.inc).

skyredwang’s picture

Version: 7.x-3.x-dev »
matslats’s picture

Title: Fatal error in hook_update(): » Fatal error in hook_update(7302):

Notice: Undefined property: stdClass::$status in _ctools_export_unpack_object() (line 594 of /var/www/drupal7/sites/all/modules/ctools/includes/export.inc).
I assume this was services module, although I've been messing in ctools myself lately.

Also after the upgrade the menu link disappeared to admin/config/services/services.
I happen to know that's going to be a pig to sort out

kylebrowning’s picture

Version: » 7.x-3.x-dev
Status: Active » Fixed

Ok, Ive committed the patch above #1 and re-taged rc2

kyberman’s picture

Version: 7.x-3.x-dev » 7.x-3.0-rc3
Status: Fixed » Active

The same problem as #5. I updated just Services module, there was that error and link disappeared.

kylebrowning’s picture

The new menu item is at admin/structure/services

kylebrowning’s picture

Status: Active » Closed (fixed)