Problem/Motivation

This module gives white screen of death during installation. The reason is - we are not using variables in empty() in some places. From empty() documentation:

Prior to PHP 5.5, empty() only supports variables; anything else will result in a parse error. In other words, the following will not work: empty(trim($name)). Instead, use trim($name) == false.

Places where we are not using variables inside empty():
- if (!empty($field_handler->element_classes())) {}
- if (!empty($field_handler->element_wrapper_classes())) {}

Proposed resolution

Use variable instead of direct value from function.

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Comments

hassan2 created an issue. See original summary.

subhojit777’s picture

Can you tell me more about the error. Can you please check the logs.

hassan2’s picture

PHP Fatal error: Can't use method return value in write context in /Applications/MAMP/htdocs/xxxxx/sites/all/modules/listjs/listjs.module on line 72

subhojit777’s picture

You are using old PHP version, see http://php.net/manual/en/function.empty.php. Is it possible that you upgrade your PHP version?

hassan2’s picture

What is the minimum php version then?

subhojit777’s picture

Assigned: Unassigned » subhojit777

Please use PHP 5.5 or higher. I will add support for lower PHP versions soon.

subhojit777’s picture

Title: could not install- white screen of death » Add support for lower PHP version
Issue summary: View changes

  • subhojit777 committed a959a5c on 7.x-1.x
    Issue #2692101 by hassan2: Add support for lower PHP version
    
subhojit777’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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