UnlemBilisim / foribaapi

Foriba eFatura, eArşiv PHP SDK
44 stars 30 forks source link

ZipArchive::addFromString() expects parameter 2 to be string, object given in /*I'm getting the error did not understand the problem*/ #8

Closed gurkan-baykan closed 5 years ago

gurkan-baykan commented 5 years ago

$xml = new \Bulut\eFaturaUBL\XMLHelper($invoice);

     $rand = rand(1000,9999);
     $destination = 'temp/'.$rand.'.zip';

       $zip = new ZipArchive;

        if($zip->open($destination,ZIPARCHIVE::CREATE) !== true) {
           return false;
              }

         $zip->addFromString($uuid.'.xml',$xml); /*faulty row*/

         $zip->close();
Orgenus commented 5 years ago

$xml değişkeni boş geliyor lütfen kontrol edin.

Orgenus commented 5 years ago

Buraya objeyi değil UBL xml vermelisiniz.

gurkan-baykan commented 5 years ago

nasıl veriliyor biraz yardımcı olabilir misiniz

Orgenus commented 5 years ago

konu hakkında Foribadan destek alabilirsiniz.