Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-21766

Missing break in ezfeZPSolrQueryBuilder causes unneeded Warnings

    XMLWordPrintable

Details

    Description

      A missing break in the method buildFacetQueryParamList causes the default case to be executed on each iteration, causing a warning to be written even if it doesn't apply.

      // Get date hardend option - may add validation later.
      if ( !empty( $facetDefinition['date.other'] ) )
      {
          switch( strtolower( $facetDefinition['date.other'] ) )
          {
              case 'before':
              case 'after':
              case 'between':
              case 'none':
              case 'all':
              {
                  $queryPart['date.other'] = strtolower( $facetDefinition['date.other'] );
              }
      
              default:
              {
                  eZDebug::writeWarning( 'Invalid option gived for date.other: ' . $facetDefinition['date.other'],
                                         __METHOD__ );
              } break;
          }
      }
      

      https://github.com/ezsystems/ezfind/blob/master/classes/ezfezpsolrquerybuilder.php#L1380

      Attachments

        Activity

          People

            Unassigned Unassigned
            jgamez jgamez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: