changing array to object for file.
changing array to object for file.

changed
if ( $maxSize>0 && $file['size]>$maxSize) { 
TO
if ( $maxSize>0 && $file->getSize()>$maxSize) {

AND
switch ( $file['error'] ) {
switch ( $file->getError() ) {
Celarius/spin-framework