diff --git a/typo3/sysext/workspaces/Classes/Service/WorkspaceService.php b/typo3/sysext/workspaces/Classes/Service/WorkspaceService.php
index f5f94f0e6cf7aa752df3633a1bc36f6638b4bffb..a2b414ed4ab6dabd7cfc7505d038e719bd3d4342 100644
--- a/typo3/sysext/workspaces/Classes/Service/WorkspaceService.php
+++ b/typo3/sysext/workspaces/Classes/Service/WorkspaceService.php
@@ -476,7 +476,7 @@ class WorkspaceService implements \TYPO3\CMS\Core\SingletonInterface {
 		$cacheKey = 'workspace-oldstyleworkspace-notused';
 		$cacheResult = $GLOBALS['BE_USER']->getSessionData($cacheKey);
 		if (!$cacheResult) {
-			$where = 'adminusers != "" AND adminusers NOT LIKE "%be_users%" AND adminusers NOT LIKE "%be_groups%" AND deleted=0';
+			$where = 'adminusers != \'\' AND adminusers NOT LIKE \'%be_users%\' AND adminusers NOT LIKE \'%be_groups%\' AND deleted=0';
 			$count = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('uid', 'sys_workspace', $where);
 			$oldStyleWorkspaceIsUsed = $count > 0;
 			$GLOBALS['BE_USER']->setAndSaveSessionData($cacheKey, !$oldStyleWorkspaceIsUsed);