Giter VIP home page Giter VIP logo

Comments (2)

danth avatar danth commented on June 12, 2024

At the line where this error occurs, the Transfer app is using a new syntax feature which was added in PHP 8. This syntax doesn't seem to be recognized by your server, although you say you're using PHP 8 so I'm not sure why this is happening.

Working around this is quite simple as we can just add a dummy variable so that the newer syntax is not required, however you may wish to look into updating PHP.

diff --git a/lib/Service/TransferService.php b/lib/Service/TransferService.php
index 39b9bac..6c355a4 100644
--- a/lib/Service/TransferService.php
+++ b/lib/Service/TransferService.php
@@ -26,10 +26,10 @@ class TransferService {
 
                try {
                        $response = $client->get($url, ["sink" => $realPath, "timeout" => 0]);
-               } catch (BadResponseException) {
+               } catch (BadResponseException $exception) {
                        // The HTTP request had an unsuccessful response code.
                        return false;
-               } catch (LocalServerException) {
+               } catch (LocalServerException $exception) {
                        // The user tried to access `localhost` or similar.
                        return false;
                }

from transfer.

daffydock avatar daffydock commented on June 12, 2024

Thanks.
I did migrate to 8.0. There might be something that is not working properly. Clearly.
Albeit a work around on your end would be, and is appreciated, I am now left wondering as to what is not working on my end.
Perhaps a module is not working, is not enabled or I missed something. I am now looking into it.

UPDATE: Made suggested changes on TransferService.php and tried again with a PDF and a JPG and it worked, both times. Still looking into what is up exactly on my end that caused this issue in the first place.

I will leave the closing of this issue up to you. Cheers.

from transfer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.