Hello Johnny,
Thanks for the fix.
I upgraded using composer. I updated the contents of the public/vendor/grocery-crud directory.
During the upgrade, CI was also upgraded to version 4.7.2
My application stopped working. It reports the error:
Error: Internal Server Error.
Odpověď serveru:
{
"title": "ErrorException",
"type": "ErrorException",
"code": 500,
"message": "Trying to access array offset on null",
"file": "D:\\xampp84\\htdocs\\fw_ci4_fektis\\vendor\\grocery-crud\\enterprise\\src\\GroceryCrud\\Core\\Model.php",
"line": 358,
"trace": [
{
"file": "D:\\xampp84\\htdocs\\fw_ci4_fektis\\vendor\\grocery-crud\\enterprise\\src\\GroceryCrud\\Core\\Model.php",
"line": 358,
"function": "errorHandler",
"class": "CodeIgniter\\Debug\\Exceptions",
"type": "->",
"args": [
2,
"Trying to access array offset on null",
"D:\\xampp84\\htdocs\\fw_ci4_fektis\\vendor\\grocery-crud\\enterprise\\src\\GroceryCrud\\Core\\Model.php",
358
]
},
{
"file": "D:\\xampp84\\htdocs\\fw_ci4_fektis\\vendor\\grocery-crud\\enterprise\\src\\GroceryCrud\\Core\\Model.php",
"line": 317,
"function": "_getPrimaryKey",
"class": "GroceryCrud\\Core\\Model",
"type": "->",
"args": [
"firmy"
]
},
{
"file": "D:\\xampp84\\htdocs\\fw_ci4_fektis\\vendor\\grocery-crud\\enterprise\\src\\GroceryCrud\\Core\\State\\InitialState.php",
"line": 175,
"function": "getPrimaryKeyField",
"class": "GroceryCrud\\Core\\Model",
"type": "->",
"args": []
},
{
"file": "D:\\xampp84\\htdocs\\fw_ci4_fektis\\vendor\\grocery-crud\\enterprise\\src\\GroceryCrud\\Core\\State\\InitialState.php",
"line": 80,
"function": "getPrimaryKeyField",
"class": "GroceryCrud\\Core\\State\\InitialState",
"type": "->",
"args": []
},
{
"file": "D:\\xampp84\\htdocs\\fw_ci4_fektis\\vendor\\grocery-crud\\enterprise\\src\\GroceryCrud\\Core\\State\\InitialState.php",
"line": 13,
"function": "showInitData",
"class": "GroceryCrud\\Core\\State\\InitialState",
"type": "->",
"args": []
},
{
"file": "D:\\xampp84\\htdocs\\fw_ci4_fektis\\vendor\\grocery-crud\\enterprise\\src\\GroceryCrud\\Core\\GroceryCrud.php",
"line": 3447,
"function": "render",
"class": "GroceryCrud\\Core\\State\\InitialState",
"type": "->",
"args": []
},
{
"file": "D:\\xampp84\\htdocs\\fw_ci4_fektis\\app\\Controllers\\Firmy.php",
"line": 129,
"function": "render",
"class": "GroceryCrud\\Core\\GroceryCrud",
"type": "->",
"args": []
},
{
"file": "D:\\xampp84\\htdocs\\fw_ci4_fektis\\vendor\\codeigniter4\\framework\\system\\CodeIgniter.php",
"line": 951,
"function": "index",
"class": "App\\Controllers\\Firmy",
"type": "->",
"args": []
},
{
"file": "D:\\xampp84\\htdocs\\fw_ci4_fektis\\vendor\\codeigniter4\\framework\\system\\CodeIgniter.php",
"line": 497,
"function": "runController",
"class": "CodeIgniter\\CodeIgniter",
"type": "->",
"args": [
{
"helpers": [
"url",
"html"
],
"request": {
"protocolVersion": "1.1",
"validProtocolVersions": [
"1.0",
"1.1",
"2.0",
"3.0"
],
"body": null,
"headers": {
"Host": {
"name": "Host",
"value": "localhost"
},
"User-Agent": {
"name": "User-Agent",
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:149.0) Gecko/20100101 Firefox/149.0"
},
"Accept": {
"name": "Accept",
"value": "*/*"
},
"Accept-Language": {
"name": "Accept-Language",
"value": "cs,sk;q=0.9,en-US;q=0.8,en;q=0.7"
},
"Accept-Encoding": {
"name": "Accept-Encoding",
"value": "gzip, deflate, br, zstd"
},
"Referer": {
"name": "Referer",
"value": "http://localhost/fw_ci4_fektis/public/firmy"
},
"Connection": {
"name": "Connection",
"value": "keep-alive"
},
"Cookie": {
"name": "Cookie",
"value": "tracy-session=57939ebb67; _gcl_au=1.1.197102636.1772457641; _ga_SBSPV5DZFM=GS2.1.s1774536291$o26$g1$t1774537310$j54$l0$h0; _ga=GA1.1.50667359.1772457641; _ga_YC7QERE9EW=GS2.1.s1774536291$o26$g1$t1774537688$j60$l0$h0; _ga_TDYCDYRVXV=GS2.1.s1774536291$o26$g1$t1774537688$j60$l0$h0; fontsLoaded=true; _fbp=fb.0.1774536759815.851769213647562642; ci_session_fektis=ddc4b5dbc668d5b863e37899d898b5a9"
},
"Sec-Fetch-Dest": {
"name": "Sec-Fetch-Dest",
"value": "empty"
},
"Sec-Fetch-Mode": {
"name": "Sec-Fetch-Mode",
"value": "cors"
},
"Sec-Fetch-Site": {
"name": "Sec-Fetch-Site",
"value": "same-origin"
}
},
"headerMap": {
"host": "Host",
"user-agent": "User-Agent",
"accept": "Accept",
"accept-language": "Accept-Language",
"accept-encoding": "Accept-Encoding",
"referer": "Referer",
"connection": "Connection",
"cookie": "Cookie",
"sec-fetch-dest": "Sec-Fetch-Dest",
"sec-fetch-mode": "Sec-Fetch-Mode",
"sec-fetch-site": "Sec-Fetch-Site"
},
"method": "GET",
"uri": {
"uriString": null,
"baseURL": {
"uriString": null,
"baseURL": null,
"segments": [
"fw_ci4_fektis",
"public"
],
"scheme": "http",
"user": null,
"password": null,
"host": "localhost",
"port": null,
"path": "/fw_ci4_fektis/public/",
"fragment": "",
"query": [],
"defaultPorts": {
"http": 80,
"https": 443,
"ftp": 21,
"sftp": 22
},
"showPassword": false,
"silent": false,
"rawQueryString": false
},
"segments": [
"firmy"
],
"scheme": "http",
"user": null,
"password": null,
"host": "localhost",
"port": null,
"path": "/fw_ci4_fektis/public/firmy",
"fragment": "",
"query": {
"action": "initial"
},
"defaultPorts": {
"http": 80,
"https": 443,
"ftp": 21,
"sftp": 22
},
"showPassword": false,
"silent": false,
"rawQueryString": false,
"basePathWithoutIndexPage": "/fw_ci4_fektis/public/",
"indexPage": "",
"baseSegments": [
"fw_ci4_fektis",
"public"
],
"routePath": "firmy"
},
"config": {
"baseURL": "http://localhost/fw_ci4_fektis/public/",
"allowedHostnames": [],
"indexPage": "",
"uriProtocol": "REQUEST_URI",
"permittedURIChars": "a-z 0-9~%.:_\\-",
"defaultLocale": "cs",
"negotiateLocale": false,
"supportedLocales": [
"cs"
],
"appTimezone": "Europe/Prague",
"charset": "UTF-8",
"forceGlobalSecureRequests": false,
"proxyIPs": [],
"CSPEnabled": false
},
The entire text could not be inserted because it is too long and the discussion system reports an error.