Uridium Posted October 13, 2021 Share Posted October 13, 2021 Ive tried to install the GL to no success on the newest version of Xampp errors are There was an error! File: D:\xampp\htdocs\gangster\class\nbbc.php Line: 155 Error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in D:\xampp\htdocs\gangster\class\nbbc.php:155 Stack trace: #0 D:\xampp\htdocs\gangster\class\nbbc.php(1953): BBCodeLexer->NextToken() #1 D:\xampp\htdocs\gangster\class\pageElement.php(56): BBCode->Parse('GL v2 successfu...') #2 D:\xampp\htdocs\gangster\class\pageElement.php(69): pageElement->convertBBCodeToHTML('GL v2 successfu...') #3 [internal function]: pageElement->{closure}(Object(Handlebars\Template), Object(Handlebars\Context), 'text', '') #4 D:\xampp\htdocs\gangster\class\Handlebars\Template.php(255): call_user_func_array(Object(Closure), Array) #5 D:\xampp\htdocs\gangster\class\Handlebars\Template.php(148): Handlebars\Template->section(Object(Handlebars\Context), Array) #6 D:\xampp\htdocs\gangster\class\Handlebars\Helpers.php(298): Handlebars\Template->render(Object(Handlebars\Context)) #7 [internal function]: Handlebars\Helpers->helperEach(Object(Handlebars\Template), Object(Handlebars\Context), 'news', '\n ...') #8 D:\xampp\htdocs\gangster\class\Handlebars\Template.php(255): call_user_func_array(Array, Array) #9 D:\xampp\htdocs\gangster\class\Handlebars\Template.php(148): Handlebars\Template->section(Object(Handlebars\Context), Array) #10 D:\xampp\htdocs\gangster\class\Handlebars\Handlebars.php(180): Handlebars\Template->render(Object(Handlebars\Context)) #11 D:\xampp\htdocs\gangster\class\pageElement.php(91): Handlebars\Handlebars->render('\n\n <...', Array) #12 D:\xampp\htdocs\gangster\class\pageElement.php(141): pageElement->templateToHTML('\n\n <...', Array) #13 D:\xampp\htdocs\gangster\class\page.php(346): pageElement->parse() #14 D:\xampp\htdocs\gangster\modules\installed\loggedin\loggedin.inc.php(31): page->buildElement('newsArticle', Array) #15 D:\xampp\htdocs\gangster\class\module.php(30): loggedin->constructModule() #16 D:\xampp\htdocs\gangster\class\page.php(144): module->__construct() #17 D:\xampp\htdocs\gangster\class\page.php(58): page->load('loggedin') #18 D:\xampp\htdocs\gangster\init.php(86): page->loadPage('loggedin') #19 D:\xampp\htdocs\gangster\index.php(5): require('D:\\xampp\\htdocs...') #20 {main} thrown Type: E_RECOVERABLE_ERROR Hmm i managed to get this installed but had to set class/nbbc.php on line 154 to false rather than true.. not sure thats a great fix but it seems to have done the trick Ive managed to whittle the error down to the BBCODE which on PHP 8 it doesnt seem to like Quote Link to comment Share on other sites More sharing options...
Magictallguy Posted October 14, 2021 Share Posted October 14, 2021 Error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given A null value was passed to a count() call. count() doesn't accept null values. nbbc.php line 155 is the call Quote Link to comment Share on other sites More sharing options...
Uridium Posted October 14, 2021 Author Share Posted October 14, 2021 Cheers MTG looked at line 155 will try work it out from there i installed the nbbcode as a standalone and same issue with that GL wasnt installed on test site Quote Link to comment Share on other sites More sharing options...
ags_cs4 Posted October 14, 2021 Share Posted October 14, 2021 (edited) i think this urbanz fixed this on the GL github repo https://github.com/ChristopherDay/Gangster-Legends-V2/pull/56 Edited October 14, 2021 by ags_cs4 Quote Link to comment Share on other sites More sharing options...
Uridium Posted October 14, 2021 Author Share Posted October 14, 2021 4 hours ago, ags_cs4 said: i think this urbanz fixed this on the GL github repo https://github.com/ChristopherDay/Gangster-Legends-V2/pull/56 Thank you found it finally 🙂 Quote Link to comment Share on other sites More sharing options...
Dayo Posted October 14, 2021 Share Posted October 14, 2021 Ill have a look at this as the php file didn't work for php 7 and i want to avoid two files for the different versions tbh Quote Link to comment Share on other sites More sharing options...
Uridium Posted October 14, 2021 Author Share Posted October 14, 2021 (edited) Dayo just replace the nbbc.php with the 4 month old version 19 hours ago, Dayo said: Ill have a look at this as the php file didn't work for php 7 and i want to avoid two files for the different versions tbh Ive tested the file on 7.4 and 8 and both work perfectly Edited October 15, 2021 by Uridium no need for the code Quote Link to comment Share on other sites More sharing options...
Dayo Posted October 15, 2021 Share Posted October 15, 2021 There were numerous error reports when i used that version i need to set up a proper test environment with several PHP/MySQL versions and do a full compatibility check, for now i cant see me dropping support for php <7.4 as its still quite a large chunk of systems Quote Link to comment Share on other sites More sharing options...
Uridium Posted October 15, 2021 Author Share Posted October 15, 2021 33 minutes ago, Dayo said: There were numerous error reports when i used that version i need to set up a proper test environment with several PHP/MySQL versions and do a full compatibility check, for now i cant see me dropping support for php <7.4 as its still quite a large chunk of systems yep tried it on 7.0 and had number of errors error: syntax error, unexpected '' (t_encapsed_and_whitespace), expecting identifier (t_string) or variable (t_variable) or number (t_num_string) line 801 is the culprit which is $urlParts['host'] = $part; ive done a { and } count and they are not equal on the updated nbbc.php version which works on php 7.3 - 8.0+ { = 216 } = 214 Not sure if its NOTEPAD++ but on line 28 which has a { there is no end also line 745 has a { and no end.. The <<<REGX line 747 doesnt seem to end Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.