dkd / php-cmis-client

This is a PHP CMIS Client implementation based on OpenCMIS. It has been retired and put in to archive mode.
Apache License 2.0
54 stars 34 forks source link

ErrorException in TypeHelperTrait.php line 79 #1

Closed abzBear closed 8 years ago

abzBear commented 8 years ago

I'm getting this error when uploading a document and only for Windows based p.c's when I do this with a Mac or Linux machine then it's ok.

Given value is of type "integer" but a value of type "double" was expected. Value has been casted to the expected type.

In the TypeHelperTrait.php class trigger_error( sprintf( 'Given value is of type "%s" but a value of type "%s" was expected.' . ' Value has been casted to the expected type.', gettype($value), $expectedType ), E_USER_NOTICE );

My work around for now is to change the trigger_error to a \Log::warning as i feel that it's not really an error but merely a message to display.

sascha-egerer commented 8 years ago

The problem has nothing todo with windows or mac/linux but your php configuration. Is there any reason why you use error logging for notices? If you change your php configuration to not handle notices as errors you can fix thtat problem. Not sure if you should change that here.

But to be honost: we have the same probelm whith unit tests... See b577b4889e9109c001445a537711a17fd5d12e34

So maybe we should really change that by catching this exception or not triggering an php error. But we can only do that if we have the Logger Interface in place to use something like monolog to log errors.

abzBear commented 8 years ago

Hi

Thanks for the reply, I haven't modified my phone configuration is the default settings that came with want server. Let me make a change and get back to you.

Thanks Abdul

On Mon, 12 Oct 2015, 20:17 Sascha Egerer notifications@github.com wrote:

The problem has nothing todo with windows or mac/linux but your php configuration. Is there any reason why you use error logging for notices? If you change your php configuration to not handle notices as errors you can fix thtat problem. Not sure if you should change that yet.

— Reply to this email directly or view it on GitHub https://github.com/dkd/php-cmis-client/issues/1#issuecomment-147480761.

sascha-egerer commented 8 years ago

I'll close that issue now as IMHO it is not really an issue.