Changeset 48
- Timestamp:
- 01/21/09 08:45:09 (4 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/wwwroot/includes/qcodo/_core/framework/QType.class.php
r22 r48 123 123 124 124 case QType::Integer: 125 if (strlen($mixItem) == 0) 126 return null; 127 if(($mixItem !== true) && ((((string)(int) $mixItem) === ((string) $mixItem)) 128 || preg_match('/^-?\d+$/',$mixItem) === 1)) 129 return $mixItem; 130 else 131 throw new QInvalidCastException(sprintf('Invalid integer: %s', $mixItem)); 125 132 case QType::Float: 126 133 if (strlen($mixItem) == 0) 127 134 return null; 135 if (!is_numeric($mixItem)) 136 throw new QInvalidCastException(sprintf('Invalid float: %s', $mixItem)); 128 137 return $mixItem; 129 138 … … 215 224 216 225 /** 217 * Used by the Q codoCode Generator to allow for the code generation of226 * Used by the QCubed Code Generator to allow for the code generation of 218 227 * the actual "Type::Xxx" constant, instead of the text of the constant, 219 228 * in generated code. … … 285 294 286 295 /** 287 * Used by the Q codoCode Generator and QSoapService class to allow for the xml generation of296 * Used by the QCubed Code Generator and QSoapService class to allow for the xml generation of 288 297 * the actual "s:type" Soap Variable types. 289 298 *
