Commit 9af55ec1 authored by catch's avatar catch

Issue #2316153 by Berdir: Fixed [typo follow-up] PHP 5.4.30/5.5.15+ changed...

Issue #2316153 by Berdir: Fixed [typo follow-up] PHP 5.4.30/5.5.15+ changed json_encode() of DateTime objects to include microseconds, breaks tests.
parent 258856ae
......@@ -129,8 +129,8 @@ public function buildForm(array $form, FormStateInterface $form_state) {
// Date.
$date = new DrupalDateTime('1978-11-01 10:30:00', 'Europe/Berlin');
// Starting with PHP 5.4.30, 5.5.15, JSON encoded DateTime objects include
// microsends. Make sure that the expected value is correct for all versions
// by encoding and decoding it again instead of hardcoding it.
// microseconds. Make sure that the expected value is correct for all
// versions by encoding and decoding it again instead of hardcoding it.
// See https://github.com/php/php-src/commit/fdb2709dd27c5987c2d2c8aaf0cdbebf9f17f643
$expected = json_decode(json_encode($date), TRUE);
$form['disabled_container']['disabled_container_datetime'] = array(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment