Index: kernel/classes/ezpolicylimitation.php
===================================================================
--- kernel/classes/ezpolicylimitation.php	(revision 22929)
+++ kernel/classes/ezpolicylimitation.php	(working copy)
@@ -243,19 +243,38 @@
         $currentFunction = $policy->attribute( 'function_name' );
         $limitationValueArray = array();
 
-        $limitation = $functions[$currentFunction ][$this->attribute( 'identifier' )];
+        $limitationIdentifier = $this->attribute( 'identifier' );
+        $limitation = $functions[$currentFunction][$limitationIdentifier];
 
         if ( $limitation &&
              count( $limitation[ 'values' ] == 0 ) &&
              array_key_exists( 'class', $limitation ) )
         {
-            $basePath = 'kernel/'; //set default basepath for limitationValueClasses
-            if( array_key_exists( 'extension', $limitation ) && $limitation['extension'] )
+            if ( array_key_exists( 'path', $limitation ) && $limitation['path'] )
             {
-                $basePath = 'extension/' . $limitation['extension'] . '/';
+                $basePath = 'kernel/'; //set default basepath for limitationValueClasses
+                if( array_key_exists( 'extension', $limitation ) && $limitation['extension'] )
+                {
+                    $basePath = 'extension/' . $limitation['extension'] . '/';
+                }
+                include_once( $basePath . $limitation['path'] . $limitation['file']  );
             }
-            include_once( $basePath . $limitation['path'] . $limitation['file']  );
-            $obj = new $limitation['class']( array() );
+
+            $className = $limitation['class'];
+
+            if ( !class_exists( $className, true ) )
+            {
+                eZDebug::writeError( "unable to find the PHP class '$className' associated with the limitation '$limitationIdentifier' of the policy $currentModule/$currentFunction" );
+
+                foreach ( $valueList as $value )
+                {
+                    $limitationValuesWithNames[] = array( 'Name' => $value, 'value' => $value );
+                }
+
+                return $limitationValuesWithNames;
+            }
+
+            $obj = new $className( array() );
             $limitationValueList = call_user_func_array ( array( $obj , $limitation['function']) , $limitation['parameter'] );
             foreach( $limitationValueList as $limitationValue )
             {
Index: kernel/role/edit.php
===================================================================
--- kernel/role/edit.php	(revision 22929)
+++ kernel/role/edit.php	(working copy)
@@ -425,22 +425,36 @@
     {
         if( count( $limitation[ 'values' ] == 0 ) && array_key_exists( 'class', $limitation ) )
         {
-            $basePath = 'kernel/'; //set default basepath for limitationValueClasses
-            if( array_key_exists( 'extension', $limitation ) && $limitation['extension'] )
+            if ( array_key_exists( 'path', $limitation ) && $limitation['path'] )
             {
-                $basePath = 'extension/' . $limitation['extension'] . '/';
+                $basePath = 'kernel/'; //set default basepath for limitationValueClasses
+                if( array_key_exists( 'extension', $limitation ) && $limitation['extension'] )
+                {
+                    $basePath = 'extension/' . $limitation['extension'] . '/';
+                }
+                include_once( $basePath . $limitation['path'] . $limitation['file']  );
             }
-            include_once( $basePath . $limitation['path'] . $limitation['file']  );
-            $obj = new $limitation['class']( array() );
-            $limitationValueList = call_user_func_array ( array( $obj , $limitation['function']) , $limitation['parameter'] );
-            $limitationValueArray =  array();
-            foreach( $limitationValueList as $limitationValue )
+
+            $className = $limitation['class'];
+
+            if ( !class_exists( $className, true ) )
             {
-                $limitationValuePair = array();
-                $limitationValuePair['Name'] = $limitationValue[ 'name' ];
-                $limitationValuePair['value'] = $limitationValue[ 'id' ];
-                $limitationValueArray[] = $limitationValuePair;
+                eZDebug::writeError( "unable to find the PHP class '$className' associated with the limitation '$key' of the policy $currentModule/$currentFunction" );
+                $limitationValueArray = array();
             }
+            else
+            {
+                $obj = new $className( array() );
+                $limitationValueList = call_user_func_array ( array( $obj , $limitation['function']) , $limitation['parameter'] );
+                $limitationValueArray =  array();
+                foreach( $limitationValueList as $limitationValue )
+                {
+                    $limitationValuePair = array();
+                    $limitationValuePair['Name'] = $limitationValue[ 'name' ];
+                    $limitationValuePair['value'] = $limitationValue[ 'id' ];
+                    $limitationValueArray[] = $limitationValuePair;
+                }
+            }
             $limitation[ 'values' ] = $limitationValueArray;
         }
         $currentFunctionLimitations[ $key ] = $limitation;
Index: kernel/role/policyedit.php
===================================================================
--- kernel/role/policyedit.php	(revision 22929)
+++ kernel/role/policyedit.php	(working copy)
@@ -67,22 +67,36 @@
     {
         if ( ( count( $limitation['values'] ) == 0 ) && array_key_exists( 'class', $limitation ) )
         {
-            $basePath = 'kernel/'; //set default basepath for limitationValueClasses
-            if( array_key_exists( 'extension', $limitation ) && $limitation['extension'] )
+            if ( array_key_exists( 'path', $limitation ) && $limitation['path'] )
             {
-                $basePath = 'extension/' . $limitation['extension'] . '/';
+                $basePath = 'kernel/'; //set default basepath for limitationValueClasses
+                if( array_key_exists( 'extension', $limitation ) && $limitation['extension'] )
+                {
+                    $basePath = 'extension/' . $limitation['extension'] . '/';
+                }
+                include_once( $basePath . $limitation['path'] . $limitation['file']  );
             }
-            include_once( $basePath . $limitation['path'] . $limitation['file']  );
-            $obj = new $limitation['class']( array() );
-            $limitationValueList = call_user_func_array( array( $obj, $limitation['function'] ), $limitation['parameter'] );
-            $limitationValueArray = array();
-            foreach ( $limitationValueList as $limitationValue )
+
+            $className = $limitation['class'];
+
+            if ( !class_exists( $className, true ) )
             {
-                $limitationValuePair = array();
-                $limitationValuePair['Name'] = $limitationValue['name'];
-                $limitationValuePair['value'] = $limitationValue['id'];
-                $limitationValueArray[] = $limitationValuePair;
+                eZDebug::writeError( "unable to find the PHP class '$className' associated with the limitation '$key' of the policy $currentModule/$currentFunction" );
+                $limitationValueArray = array();
             }
+            else
+            {
+                $obj = new $className( array() );
+                $limitationValueList = call_user_func_array( array( $obj, $limitation['function'] ), $limitation['parameter'] );
+                $limitationValueArray = array();
+                foreach ( $limitationValueList as $limitationValue )
+                {
+                    $limitationValuePair = array();
+                    $limitationValuePair['Name'] = $limitationValue['name'];
+                    $limitationValuePair['value'] = $limitationValue['id'];
+                    $limitationValueArray[] = $limitationValuePair;
+                }
+            }
             $limitation['values'] = $limitationValueArray;
         }
         $currentFunctionLimitations[ $key ] = $limitation;
