PhP 7 and Proforms

Permalink
Hi

I'm installed the legacy version of C5 (5.6.4.0) that runs on PHP7 (https://github.com/concrete5/concrete5-legacy). I'm trying out some of my add ons and most work fine, but have issues with Proforms. I appreciate that the developer of the add on no longer supports the add on, so this may be a dead end now. The error messages on install are:

Warning: Declaration of FileApproveAttributeTypeController::post($field = false) should be compatible with Concrete5_Library_AttributeTypeController::post($field = false, $defaultValue = NULL) in /Applications/MAMP/htdocs/concrete5legacy/packages/proforms/models/attribute/types/file_approve/controller.php on line 370
Warning: Declaration of FileApproveAttributeTypeController::request($field = false) should be compatible with Concrete5_Library_AttributeTypeController::request($field = false, $defaultValue = NULL) in /Applications/MAMP/htdocs/concrete5legacy/packages/proforms/models/attribute/types/file_approve/controller.php on line 370
Warning: Declaration of SimpleFileAttributeTypeController::post($field = false) should be compatible with Concrete5_Library_AttributeTypeController::post($field = false, $defaultValue = NULL) in /Applications/MAMP/htdocs/concrete5legacy/packages/proforms/models/attribute/types/simple_file/controller.php on line 283
Warning: Declaration of SimpleFileAttributeTypeController::request($field = false) should be compatible with Concrete5_Library_AttributeTypeController::request($field = false, $defaultValue = NULL) in /Applications/MAMP/htdocs/concrete5legacy/packages/proforms/models/attribute/types/simple_file/controller.php on line 283
Warning: Declaration of ValidatedSimpleFileAttributeTypeController::post($field = false) should be compatible with Concrete5_Library_AttributeTypeController::post($field = false, $defaultValue = NULL) in /Applications/MAMP/htdocs/concrete5legacy/packages/proforms/models/attribute/types/validated_simple_file/controller.php on line 333
Warning: Declaration of ValidatedSimpleFileAttributeTypeController::request($field = false) should be compatible with Concrete5_Library_AttributeTypeController::request($field = false, $defaultValue = NULL) in /Applications/MAMP/htdocs/concrete5legacy/packages/proforms/models/attribute/types/validated_simple_file/controller.php on line 333
Warning: Declaration of SelectValuesAttributeTypeController::exportValue($akn) should be compatible with Concrete5_Library_AttributeTypeController::exportValue(SimpleXMLElement $akv) in /Applications/MAMP/htdocs/concrete5legacy/packages/proforms/models/attribute/types/select_values/controller.php on line 466
Warning: Declaration of SelectValuesAttributeTypeController::validateKey($args) should be compatible with Concrete5_Library_AttributeTypeController::validateKey($args = false) in /Applications/MAMP/htdocs/concrete5legacy/packages/proforms/models/attribute/types/select_values/controller.php on line 466
Warning: Declaration of RadioAttributeTypeController::exportValue($akn) should be compatible with Concrete5_Library_AttributeTypeController::exportValue(SimpleXMLElement $akv) in /Applications/MAMP/htdocs/concrete5legacy/packages/proforms/models/attribute/types/radio/controller.php on line 433
Warning: Declaration of RadioAttributeTypeController::validateKey($args) should be compatible with Concrete5_Library_AttributeTypeController::validateKey($args = false) in /Applications/MAMP/htdocs/concrete5legacy/packages/proforms/models/attribute/types/radio/controller.php on line 433
Warning: Declaration of PriceEventAttributeTypeController::validateKey($args) should be compatible with Concrete5_Library_AttributeTypeController::validateKey($args = false) in /Applications/MAMP/htdocs/concrete5legacy/packages/proforms/models/attribute/types/price_event/controller.php on line 638
Warning: Declaration of PriceSelectAttributeTypeController::exportValue($akn) should be compatible with Concrete5_Library_AttributeTypeController::exportValue(SimpleXMLElement $akv) in /Applications/MAMP/htdocs/concrete5legacy/packages/proforms/models/attribute/types/price_select/controller.php on line 433
Warning: Declaration of PriceSelectAttributeTypeController::validateKey($args) should be compatible with Concrete5_Library_AttributeTypeController::validateKey($args = false) in /Applications/MAMP/htdocs/concrete5legacy/packages/proforms/models/attribute/types/price_select/controller.php on line 433
Warning: Declaration of PriceDiscountAttributeTypeController::exportValue($akn) should be compatible with Concrete5_Library_AttributeTypeController::exportValue(SimpleXMLElement $akv) in /Applications/MAMP/htdocs/concrete5legacy/packages/proforms/models/attribute/types/price_discount/controller.php on line 456
Warning: Declaration of PriceDiscountAttributeTypeController::validateKey($args) should be compatible with Concrete5_Library_AttributeTypeController::validateKey($args = false) in /Applications/MAMP/htdocs/concrete5legacy/packages/proforms/models/attribute/types/price_discount/controller.php on line 456


Any thoughts or suggestions, other than move away from Proforms ;-)

 
ConcreteOwl replied on at Permalink Best Answer Reply
ConcreteOwl
If you look at the error messages you will see the solution..
Lets take the first message .. PHP is telling you that on line 370 of the packages/proforms/models/attribute/types/file_approve/controller.php you have this
FileApproveAttributeTypeController::request($field = false)

The part that needs changing is
request($field = false)

Just change it to this
request($field = false, $defaultValue = NULL)
justynpride replied on at Permalink Reply
Thanks for the helpful reply. It may just be me but line 370 in that controller is just }.

<?php   
defined('C5_EXECUTE') or die("Access Denied.");
class FileApproveAttributeTypeController extends AttributeTypeController {
   protected $searchIndexFieldDefinition = 'I DEFAULT 0 NULL';
   public $is_multipart = 1;
   private function load() {
      $ak = $this->getAttributeKey();
      if (is_object($ak)) {
         //return false;
         $db = Loader::db();
         $row = $db->GetRow('select * from atFileApproveSettings where akID = ?', $ak->getAttributeKeyID());
      }
      $this->akID = $row['akID'];
      $this->asID = $row['asID'];
      $this->approver = $row['approver'];


Happy to have missed something!
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
Take a look at line 313..
justynpride replied on at Permalink Reply
very helpful.
justynpride replied on at Permalink Reply
So everything is sorted apart from a more perplexing fatal error:

Fatal error: Call to undefined static method Concrete5_Model_AttributeKey::add() in /Applications/MAMP/htdocs/concrete5legacy/concrete/core/models/attribute/key.php on line 13
.

Huge thanks to weyboat for getting it this far.

Having tried installs of other Proforms related addons I’ve encountered the same error. I’ve not had a chance to try ProBlog or Proevents yet which are by the same developer.