function DoTransformFetchedValue($fieldName, &$fetchedValue) { if ($this->GetColumnNativeType($fieldName) == 'bytea') { if ($fetchedValue == null || !isset($fetchedValue)) { return null; } else { return stream_get_contents($fetchedValue); } } else { return parent::DoTransformFetchedValue($fieldName, $fetchedValue); } }