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

Doctrine\DBAL\Exception\DriverException is thrown when content with chr(194) is published

    Details

      Description

      Example code to reproduce the issue:

              $services = array(
                  'content_type' => $repository->getContentTypeService(),
                  'content'      => $repository->getContentService(),
                  'location'     => $repository->getLocationService(),
                  'search'       => $repository->getSearchService()
              );
       
              $contentType = $services['content_type']->loadContentTypeByIdentifier('folder');
              $contentCreateStruct = $services['content']->newContentCreateStruct($contentType, 'eng-US');
              $contentCreateStruct->setField('name', 'Test ' . chr(194));
       
              $locationCreateStruct = $services['location']->newLocationCreateStruct(1);
              $draft = $services->createContent($contentCreateStruct, array($locationCreateStruct));
              $content = $services->publishVersion($draft->versionInfo);
      

      is leading to

      [Doctrine\DBAL\Exception\DriverException]                                                                                                                                          
        An exception occurred while executing 'INSERT INTO `ezcontentobject` (`id`, `current_version`, `name`, `contentclass_id`, `section_id`, `owner_id`, `initial_language_id`, `remot  
        e_id`, `modified`, `published`, `status`, `language_mask`) VALUES (null, :placeholder1, :placeholder2, :placeholder3, :placeholder4, :placeholder5, :placeholder6, :placeholder7,  
         :placeholder8, :placeholder9, :placeholder10, :placeholder11)' with params [1, "\x54\x65\x73\x74\x20\xc2", 1, 1, 329, 2, "0de497092cb419f116fb1c0ad2223a1c", 0, 0, 0, 2]:         
                                                                                                                                                                                           
        SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xC2' for column 'name' at row 1 
      

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Serhey Dolgushev
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: