Explorar o código

fixed TableAcl getXsdTypes

Piotr Labudda %!s(int64=8) %!d(string=hai) anos
pai
achega
f61a62e10e
Modificáronse 1 ficheiros con 6 adicións e 4 borrados
  1. 6 4
      SE/se-lib/TableAcl.php

+ 6 - 4
SE/se-lib/TableAcl.php

@@ -2014,10 +2014,12 @@ class TableAcl extends Core_AclBase {
 	}
 
 	public function getXsdTypes() { // @returns [ fieldName => xsdType, ... ]
-		$thisGetXsdType = [ $this, 'getXsdFieldType' ];
-		return array_map(function ($field) use ($thisGetXsdType) {
-			return $thisGetXsdType( $field['name'] );
-		}, $this->getFields());
+		$xsdTypes = [];
+		foreach ($this->getFields() as $field) {
+			$fieldName = $field['name'];
+			$xsdTypes[ $fieldName ] = $this->getXsdFieldType( $fieldName );
+		}
+		return $xsdTypes;
 	}
 	public function getFieldsWithXsdTypes() {
 		$xsdTypes = [];