Closed (fixed)
Project:
Party
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Jan 2012 at 21:34 UTC
Updated:
10 Jun 2012 at 21:21 UTC
Jump to comment: Most recent file
I'm just playing in a vanilla Drupal install with the 1.x-dev branch as of Jan 19, and got an the following unhelpful error when trying to install only party and party_hat:
Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in modules/party/party.module on line 91
I'm not sure where the "T_PAAMAYIM_NEKUDOTAYIM" is coming from, but I commented out link 91 and that fixed the problem:
$set['class']::hook_entity_info_alter($entity_info[$set['entity type']]);
But I'm probably breaking something in the process.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | 1410882.party_.party_entity_info_alter-callable-php52.patch | 529 bytes | joachim |
| #7 | party-syntax-error-in-party-module-1410882-.patch | 528 bytes | finn lewis |
Comments
Comment #1
that0n3guy commentedI'm also seeing this. I think its a php 5.2 issue. I changed to 5.3 and was able to install just fine.
I'm no php pro, but I think the solution would be to change:
$set['class']::hook_entity_info_alter($entity_info[$set['entity type']]);to something like:
call_user_func($set['class'].'::'.hook_entity_info_alter($entity_info[$set['entity type']]));I'm not sure if my syntax is right, but it seemed to work on my local install. But you said deleting it completely worked too so my fix may have done nothing.
Comment #2
that0n3guy commentedOk that didn't work.... after enabling party_hats and party_profile2 I got:
Fatal error: Call to undefined function hook_entity_info_alter() in sites\all\modules\party\party.module on line 91I guess my googling wasn't as ninja as I thought. Someone wiser than I will have to look at it. For now, I'll just use php 5.3
Comment #3
rlmumfordAt the moment Party is known to only work with PHP 5.3 because of the way the CRM Controller works. But i didn't realise there was a problem in party.module as well. Probably worth checking this out in more detail.
I would be happy to edit this to use call_user_func() but would only do it if it could be tested thoroughly. If one of you can test that it works with call user func I'll happily put a patch in. thanks for your interest!
Comment #4
joachim commented> At the moment Party is known to only work with PHP 5.3 because of the way the CRM Controller works
I thought most of that had been removed from the controller class?
Comment #5
joachim commentedProbably want this: http://www.php.net/manual/en/language.pseudo-types.php#language.types.ca...
Comment #6
finn lewisUsing PHP 5.2.13 - I get the error mentioned by the OP - changing this line as per joachim's suggestion does get around this error.
I am now switching to PHP 5.3 :)
Comment #7
finn lewisPatch attached
Comment #8
joachim commentedCommitted, thanks!
Comment #9
joachim commentedNope, this doesn't work.
I think you have to give an array instead of a function name...
Comment #10
dimmech commentedJust a heads up... this issue is currently marked as fixed and is not. Error is now on line 102.
Comment #11
joachim commentedIndeed. Let's reopen.
Comment #12
joachim commentedCould someone on PHP 5.2 try this patch please?
Comment #13
dimmech commentedNo errors with the patch in #12, Party enabled successfully!
Comment #14
joachim commentedThanks for testing! Do please report any further problems you have running Party on PHP 5.2.
Comment #15.0
(not verified) commenteddetails added