We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I got a strange problem that I can't understand. This snippet:
<?php namespace test; require 'vendor/autoload.php'; use Respect\Rest\Router; $r3 = new Router('/tools/test.php'); $r3->get('/', function() { return array('v' => 2.0); })->accept( array( 'text/html' => array( 'myns\\Standard', 'htmlRenderer'))); namespace myns; class Standard { public static function htmlRenderer($data) { return 'OK'; } }
works on window with php 5.4 and fails (Fatal error: Function name must be a string ) in ubuntu with php 5.3.
If in ubuntu I change the line 67 in file request.php from:
$response = $proxyCallback($response);
to
$response = call_user_func($proxyCallback,$response);
it works! The problem seams related to namespace because if I remove namespace it works in both environments. Can someone figure why?
This is a great library!!! Thank you
It seams that the problem is related to a change in php 5.4.:
$callback = array($object, 'methodName'); $callback(); // prior to PHP 5.4 you need call_user_func()
Is php 5.4 a requirement for Respect\Rest?
The text was updated successfully, but these errors were encountered:
@botk thank you for bringing this under our attention. =)
Sorry, something went wrong.
No branches or pull requests
Hi,
I got a strange problem that I can't understand. This snippet:
works on window with php 5.4 and fails (Fatal error: Function name must be a string ) in ubuntu with php 5.3.
If in ubuntu I change the line 67 in file request.php from:
to
it works!
The problem seams related to namespace because if I remove namespace it works in both environments.
Can someone figure why?
This is a great library!!! Thank you
UPDATE:
It seams that the problem is related to a change in php 5.4.:
Is php 5.4 a requirement for Respect\Rest?
The text was updated successfully, but these errors were encountered: