Hello,

I tried to install Commons Distribution ver 7.x-3.32 and encountered an error which I don't have any clue what it is about. Can anyone explain what has gone wrong or is it a bug in the code?

The error message is shown below:

"An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: http://mydomain/comm/install.php?profile=commons&locale=en&id=1&op=do StatusText: OK ResponseText: Parse error: syntax error, unexpected T_FUNCTION in /serverpath/mydomain/public_html/comm/profiles/commons/modules/contrib/editor/modules/editor_ckeditor/editor_ckeditor.module on line 453"

Any assistance is very much appreciated.

Thank you.

Comments

sjcctan’s picture

Anything wrong with these codes?

$get_attribute_values = function($attribute_values, $allowed_values) {
$values = array_keys(array_filter($attribute_values, function($value) use ($allowed_values) {
if ($allowed_values) {
return $value !== FALSE;
}
else {
return $value === FALSE;
}
}));

if (count($values)) {
return implode(',', $values);
}
else {
return NULL;
}
};

$allowed = array();
$disallowed = array();

if (isset($html_restrictions['forbidden'])) {
foreach ($html_restrictions['forbidden'] as $tag) {
$disallowed[$tag] = TRUE;
}
}

foreach ($html_restrictions['allowed'] as $tag => $attributes) {
// Tell CKEditor the tag is allowed, but no attributes.
if ($attributes === FALSE) {
$allowed[$tag] = array(
'attributes' => FALSE,
'styles' => FALSE,
'classes' => FALSE,
);

sjcctan’s picture

Somebody told me it is a PHP version issue.

Thanks.