| @@ 552-557 (lines=6) @@ | ||
| 549 | if (is_array($value)) { |
|
| 550 | foreach ($value as $sub) { |
|
| 551 | /* Solr requires dates in the form 1995-12-31T23:59:59Z */ |
|
| 552 | if ($type == 'tdate') { |
|
| 553 | if (!$sub) { |
|
| 554 | continue; |
|
| 555 | } |
|
| 556 | $sub = gmdate('Y-m-d\TH:i:s\Z', strtotime($sub)); |
|
| 557 | } |
|
| 558 | ||
| 559 | /* Solr requires numbers to be valid if presented, not just empty */ |
|
| 560 | if (($type == 'tint' || $type == 'tfloat' || $type == 'tdouble') && !is_numeric($sub)) { |
|
| @@ 568-573 (lines=6) @@ | ||
| 565 | } |
|
| 566 | } else { |
|
| 567 | /* Solr requires dates in the form 1995-12-31T23:59:59Z */ |
|
| 568 | if ($type == 'tdate') { |
|
| 569 | if (!$value) { |
|
| 570 | return; |
|
| 571 | } |
|
| 572 | $value = gmdate('Y-m-d\TH:i:s\Z', strtotime($value)); |
|
| 573 | } |
|
| 574 | ||
| 575 | /* Solr requires numbers to be valid if presented, not just empty */ |
|
| 576 | if (($type == 'tint' || $type == 'tfloat' || $type == 'tdouble') && !is_numeric($value)) { |
|