CommentFileSizeAuthor
#5 role_expire-strict_warning-1442936.patch596 bytesmacmladen

Comments

ysaintlary’s picture

Oups..
Here is the complete message error:

Strict warning : Declaration of role_expire_handler_field_rid::pre_render() should be compatible with that of views_handler_field::pre_render() dans require_once() (ligne 83 dans C:\xampp\htdocs\anmjpm\sites\all\modules\contrib\role_expire\role_expire.views.inc).

stewsnooze’s picture

Status: Active » Postponed (maintainer needs more info)

What version of Views and CTOOLS are you running?

feuerste’s picture

I get the same warning with Views 7.x-3.3 and Chaos Tools 7.x-1.0

mariagwyn’s picture

Same error, also views 7.x-3.3 and ctools 7.x-1.0.

macmladen’s picture

StatusFileSize
new596 bytes

It is just the question of PHP 5.3 vs PHP 5.2 where it wouldn't report a problem.

Solution: just add reference in declaration like:

class role_expire_handler_field_rid extends views_handler_field {

  // Derived from views_handler_field_user_roles
  // Purpose: get the *names* that correspond to the role_expire_rids.
  function pre_render(&$values) {  // <-- HERE, add & for reference like in views declaration
    $roles = array();
    $this->items = array();

I think this could be committed as fix, maintainer?

I've included patch if it is ok.

stewsnooze’s picture

Assigned: ysaintlary » stewsnooze
Status: Postponed (maintainer needs more info) » Needs review

Thanks MacMladen. I've pushed this into git. It should be available when the next auto dev release takes place

mrded’s picture

Version: 7.x-1.0-beta2 » 7.x-1.x-dev
Issue summary: View changes

Any progress guys?

jonhattan’s picture

Status: Needs review » Fixed

This was committed to git and is available in the dev release, so fixed.

Status: Fixed » Closed (fixed)

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

daniel wentsch’s picture

The same issue came up again when using PHP 5.5.

sobi3ch’s picture

Issue summary: View changes

So now if I don't use patch or dev version I have this bug on my site. Can someone create new beta3 version? Please.

vortexcentrum’s picture

It's back...

Strict warning: Declaration of role_expire_handler_field_rid::pre_render() should be compatible with views_handler_field::pre_render(&$values) in require_once() (line 83 of [domain]/sites/all/modules/role_expire/role_expire.views.inc).

D7 on PHP5.5. All D7 core and modules are the latest versions.

++ I held my breath, broke a previously unbroken rule, and replaced the .beta2 version with the .dev version. Warning gone. ++