This error is printet in the content whenever I do anything with this module (Configurations, permissions, viewing pages where this is added, editing/adding bookings etc:

Strict warning: Only variables should be passed by reference i availability_calendars_get_settings() (linje 77 af D:\web\xampp\htdocs\drupal\sites\all\modules\availability_calendars\availability_calendars.inc).

I have not tweaked this module in any way.

Comments

fietserwin’s picture

Title: A general bug » Strict warning: Only variables should be passed by reference in availability_calendars_get_settings()
Assigned: Unassigned » fietserwin
Status: Active » Needs work

No idea why I don't get that error. The PHP manual even states that such a construct "Produces fatal error since PHP 5.0.5".

Anyway, to solve, change as follows:
file availability_calendars.inc

function availability_calendars_get_settings($scope = NULL, $arg = NULL) {
  // Default settings.
  $firststatus = reset(availability_calendars_get_states());
  ...

Into:

function availability_calendars_get_settings($scope = NULL, $arg = NULL) {
  // Default settings.
  $states = availability_calendars_get_states();
  $firststatus = reset($states);
  ...

I will commit this later, so it appears in the dev version, but am currently in the middle of some quite large code changes.

Thanks for reporting.

fietserwin’s picture

Version: 7.x-2.1 » 7.x-2.x-dev
Status: Needs work » Fixed

Fixed in the dev version. Will also become available in the 7.x-2.2 version, available shortly.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.