I am currently getting the following error in my User model.
Slim Application Error
The application could not run because of the following error:
Details
Type: ActiveRecord\UndefinedPropertyException
Message: Undefined property: User->Array in /var/www/public_html/devsite/vendor/php-activerecord/php-activerecord/lib/Model.php on line 521
File: /var/www/public_html/devsite/vendor/php-activerecord/php-activerecord/lib/Model.php
Line: 521
My model only crashes the program when I add the line below to it.
static $validates_uniqueness_of = array(
'username'
);
If I remove the line above then the program runs again just fine. So I know it has something to do with this.
According to the documentation this should indeed be the format. (http://www.phpactiverecord.org/projects/main/wiki/Validations#validates_uniqueness_of)
Reference to the validate function from the library is below:
Line 563 -- https://github.com/jpfuentes2/php-activerecord/blob/master/lib/Validations.php
I'm using PHP Version 7.0.15-0 on ubuntu0.16.04.4
If this is truly a bug, does anyone have any workarounds?
public static $validates_uniqueness_of = array( 'username' )