Share » Forums » Setup & design » how to stop coping for users ?!

how to stop coping for users ?!

how to stop coping for users ?!

Thursday 22 May 2003 2:24:26 am - 4 replies

Author Message

Selmah Maxim

Thursday 22 May 2003 2:38:11 am

maybe i found BUG !

now, i changed the users role, now they cann`t copy or create in the main folder, but if i write content/copy/NODE_ID , i get white page, and the debug report find errors :

Missing argument 2 for handleerror()
in c:\php\www\ez32\lib\ezutils\classes\ezmodule.php on line 228

Undefined variable: errorType in c:\php\www\ez32\lib\ezutils\classes\ezmodule.php on line 236

No template could be loaded for "error//3.tpl" using resource "design"

template 3.tpl is there under /design/my/templates/content/error/kernel .

is this bug, or i made somthing error here ?!?!

Selmah Maxim

Thursday 22 May 2003 3:01:30 am

Small Bug found !

kernel/content/copy.php line 44:
if ( $object === null )
return $Module->handleError( EZ_ERROR_KERNEL_NOT_AVAILABLE, "kernel" );

and to avoide this bug in another files, i had added $errorType default 'kernel'

lib\ezutils\classes\ezmodule.php line 228
function &handleError( $errorCode, $errorType="kernel", $parameters = array() )

Jan Borsodi

Thursday 22 May 2003 4:28:32 am

Thanks, I've added the fix in copy.php.

I've also fixed the handleError to handle errors more gracefully ;).
It will now allow the error type to not be supplied in which case it assumes 'kernel' and issues a warning.
function &handleError( $errorCode, $errorType = false, $parameters = array() )
{
if ( !$errorType )
{
eZDebug::writeWarning( "No error type specified for error code $errorCode, assuming kernel.\nA specific error type should be supplied, please check your code.",
'eZModule::handleError' );
$errorType = 'kernel';
}

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Selmah Maxim

Thursday 22 May 2003 5:15:32 am

no problem :)

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu