Bug Reports
Entering forum request with some characters causes PHP error [bug]
bug

Using this title here (in this forum)



Allow to book classes with different duration, e.g. mix 45/60mins [feature]



cause the following PHP warning/error. Removing the later part ", e.g. mix 45/60mins" fixes the issue. So it seems to be a problem with some characters I suppose.


PHP error:


Warning: str_repeat(): Second argument has to be greater than or equal to 0 in /var/www/forum.octb.us/html/sys/CODOF/Service/BadgeService.php on line 105

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 2031 in /var/www/forum.octb.us/html/sys/CODOF/Service/BadgeService.php:110 Stack trace: #0 /var/www/forum.octb.us/html/sys/CODOF/Service/BadgeService.php(110): PDOStatement->execute(Array) #1 /var/www/forum.octb.us/html/sys/CODOF/Forum/Post.php(627): CODOF\Service\BadgeService->getRewardedBadgesForUsers(Array) #2 /var/www/forum.octb.us/html/sys/CODOF/Forum/Post.php(69): CODOF\Forum\Post->gen_posts_arr(Array) #3 /var/www/forum.octb.us/html/sys/Controller/Ajax/forum/topic.php(90): CODOF\Forum\Post->get_posts(25, 1180) #4 /var/www/forum.octb.us/html/sys/Controller/forum.php(476): Controller\Ajax\forum\topic->get_posts(25, 59, Array) #5 /var/www/forum.octb.us/html/routes.php(506): Controller\forum->topic(25, '60mins [feature...') #6 [internal function]: {closure}(25, 'Allow to book c...', '60mins [feature...') #7 /var/www/forum.octb.us/html/sys/CODOF/Router/Router.php(91): call_user_func_array(Object(Closure), Array) #8 /var/www/forum.octb.us/html/sys/CODOF/ in /var/www/forum.octb.us/html/sys/CODOF/Service/BadgeService.php on line 110
Using this title here (in this forum) > Allow to book classes with different duration, e.g. mix 45/60mins [feature] cause the following PHP warning/error. Removing the later part ", e.g. mix 45/60mins" fixes the issue. So it seems to be a problem with some characters I suppose. PHP error: ```` Warning: str_repeat(): Second argument has to be greater than or equal to 0 in /var/www/forum.octb.us/html/sys/CODOF/Service/BadgeService.php on line 105 Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 2031 in /var/www/forum.octb.us/html/sys/CODOF/Service/BadgeService.php:110 Stack trace: #0 /var/www/forum.octb.us/html/sys/CODOF/Service/BadgeService.php(110): PDOStatement->execute(Array) #1 /var/www/forum.octb.us/html/sys/CODOF/Forum/Post.php(627): CODOF\Service\BadgeService->getRewardedBadgesForUsers(Array) #2 /var/www/forum.octb.us/html/sys/CODOF/Forum/Post.php(69): CODOF\Forum\Post->gen_posts_arr(Array) #3 /var/www/forum.octb.us/html/sys/Controller/Ajax/forum/topic.php(90): CODOF\Forum\Post->get_posts(25, 1180) #4 /var/www/forum.octb.us/html/sys/Controller/forum.php(476): Controller\Ajax\forum\topic->get_posts(25, 59, Array) #5 /var/www/forum.octb.us/html/routes.php(506): Controller\forum->topic(25, '60mins [feature...') #6 [internal function]: {closure}(25, 'Allow to book c...', '60mins [feature...') #7 /var/www/forum.octb.us/html/sys/CODOF/Router/Router.php(91): call_user_func_array(Object(Closure), Array) #8 /var/www/forum.octb.us/html/sys/CODOF/ in /var/www/forum.octb.us/html/sys/CODOF/Service/BadgeService.php on line 110 ````

We are working on the feature to change the duration before scheduling irrespective your subscription. It is coming SOON.


We are working on the feature to change the duration before scheduling irrespective your subscription. It is coming SOON.
59
1
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft