Comments (2)
The error occurs in class DefinitionService
at the beginning in the constructor. Here is the excerpt. The line is marked by comment:
class DefinitionService {
private $api;
private $database;
public function __construct(CrudApi $api)
{
$this->api = $api;
$this->database = $this->optimizeDatabase($this->api->readDatabase(array()));
$this->properties = array(); // <#################### That's line 13088
}
...
}
The warning appears direct just after calling the file. As I was short in the time yesterday I did some more testing's today:
Concerning the warning from yesterday:
System: xampp, PHP 8.2.8
Additional to the deprecated warning I miss the 'Add table' button on the starting page.
Testing today:
System: Plesk live server, PHP 8.2.6 (= former version)
and same effects on:
System: xampp, PHP 8.1.6
System: xampp, PHP 7.4.30
No deprecate warning
Button is shown but the script behind does not work:
Creating a table gives message: Created newTable: Array
(Note: 'Array' was not the used table name)
Table has not been created
Thrown php error:
'Warning: Array to string conversion in pathTo_testing\php-REST-API\admin.php on line 13939'
The error concerns to the return value of function 'renderVarNode'.
Here is the code, line is marked:
private function renderVarNode(/*object*/$node, array $data): string
{
$parts = $this->explode('|', $node->expression);
$path = array_shift($parts);
try {
$value = $this->resolvePath($path, $data);
$value = $this->applyFunctions($value, $parts, $data);
} catch (\Throwable $e) {
return $this->escape('{{' . $node->expression . '!!' . $e->getMessage() . '}}');
}
if ($value instanceof TemplateString) {
return $value;
}
return $this->escape((string) $value); // <########### That's line 13939
}
All tests in Firefox + Chrome (most actual versions)
All tests with (not only) activated pdo drivers 'mysql, odbc, pgsql, sqlite' and 'sqlite3'
Indeed I am wondering about that result and suppose a mistake on my part:
Could it be that sqlite is not supported from the crud_admin?
Indeed your description is just:
A database admin interface for MySQL, PostgreSQL or SQL Server
However ... the deprecated message could be interesting at all.
At the moment there is no time for more testing's and especially the crud_admin is not so much of current interest to me as I use another admin for working with sqlite. So I would suggest, that if there is no other who could confirm that results, you maybe should ignore this report and maybe set this on monitoring.
Once more: the crud_api enviroment is a very good job at all :-)
from php-crud-admin.
Thank you for your kind words. Can you post the lines that the error occurs in? I need to see the lines around db-testDbLight\admin.php line 13088 to see where in the original document this code is called. If you could provide the callstack then that would be even better.
from php-crud-admin.
Related Issues (9)
- Error when $_SERVER['PATH_INFO'] is not set HOT 1
- Fatal Error, must be array HOT 8
- Unsure why I keep getting this requested URL was not found on the server HOT 2
- A way to automatic create pivotal table.
- BUG or entry error? HOT 2
- Not aligned with latest changes HOT 5
- Rewrite required HOT 7
- can i use external database
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-crud-admin.