Commit a71aaff2 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

Issue #3282447 by rpayanm, Fabianx: Use hasJson method if it exists (fixes Oracle driver)

parent 77164e09
Loading
Loading
Loading
Loading
+2 −0
Changes for src/Form/UpgradeStatusForm.php: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -839,10 +839,12 @@ MARKUP
      $class = 'no-known-error';
      $requirement = $this->t('Supported.');
      try {
        if (!method_exists($this->database, 'hasJson') || !$this->database->hasJson()) {
          // A hasJson() method was added to Connection from Drupal 9.4.0
          // but we cannot rely on being on Drupal 9.4.x+
          $this->database->query($database_type == 'pgsql' ? 'SELECT JSON_TYPEOF(\'1\')' : 'SELECT JSON_TYPE(\'1\')');
        }
      }
      catch (\Exception $e) {
        $class = 'known-error';
        $status = FALSE;