public static function updateSObjectFields(SObject $sob, $fields) {
			if (!is_array($fields) && !is_object($fields))
				throw new InvalidArgumentException('$fields must be an array or object');

			if (is_object($sob->fields))
				$fields = (object)$fields;

			$sob->fields = $fields;

			return $sob;
		}