Skip to content
Permalink
Browse files

Revert "Minor optimization for DateTimeType"

This reverts commit 2d153f0. While
this minor optimization should have helped improve performance, but has
created subtle issues in at least one application.

Refs #9066
  • Loading branch information...
markstory committed Jul 20, 2016
1 parent 2fd23df commit 70c0ca3e4dfa50014857eb153d7c005a5d1502c2
Showing with 1 addition and 5 deletions.
  1. +1 −5 src/Database/Type/DateTimeType.php
@@ -122,10 +122,6 @@ public function toPHP($value, Driver $driver)
list($value) = explode('.', $value);
}
if ($this->_datetimeInstance === null) {
$this->_datetimeInstance = new $this->_className;
}
$instance = clone $this->_datetimeInstance;
return $instance->modify($value);
@@ -261,7 +257,7 @@ protected function _setClassName($class, $fallback)
$class = $fallback;
}
$this->_className = $class;
$this->_datetimeInstance = null;
$this->_datetimeInstance = new $this->_className;
}
/**

0 comments on commit 70c0ca3

Please sign in to comment.
You can’t perform that action at this time.