Closed ctoesca closed 7 years ago
I patched CSV.php: line 227:
if ($length > $i)
$input = substr( $input, $i );
I don't know if it's the right way but it works.
@ctoesca - have you run into any other issues with PHP7?
Scott
No other issues. But I use only command() and query() methods.
Thanks for the info!
Scott
i have this same issue with select queries, some queries would throws this error also queries that executed ok, didn't have all data. when i ran the same sql in webadmin, all the data was here i downgraded to 1.2.3 nad this problem disappeared
Will this issue be fixed? PHP 7 is the future, so I cannot leave it and back to PHP 5.6.
@ctoesca your patch works. Could you create a pull request? Maybe @Ostico will do a code review?
Hi all. these days i will look for php7 full compatibility.
@ctoesca i will review/test your patch
The same error on query (DEFAULT VALUES)
INSERT INTO Goods CONTENT {"@class":"Goods","@version":0,"@rid":"#-1:-1"}
CSV.php line 32
if(!empty($input)) {
$chunk = self::eatKey( $input );
$key = $chunk[ 0 ];
$input = $chunk[ 1 ];
}
I test this framework on PHP7, yet found only this two bugs
@ctoesca adding that 'if' statement has side effects later on the function. In the original code, $input is being overwritten to contain the "rest" of the param $input after a break in the for loop before.
There's logic afterwards that is using the now cutdown $input (the left-overs) but with your added if statement, that code is processing the original string, not the cutdown version.
Perhaps the if statement should encompass the rest of the code until just before the return?
Since I have upgraded PHP (v7), when I insert a vertex (with command() method) , I have this error: Uninitialized string offset: 0
The vertex is well created. The vertex I send is:
No problem with SELECT queries.