Bug InvalidArgumentException: Attempted to convert NULL to integer [post_id]

Status
Not open for further replies.

Mr.Alhabash

Customer
I got this error

Code:
Server error log
InvalidArgumentException: Attempted to convert NULL to integer [post_id] src/XF/Mvc/Entity/Entity.php:691

Stack trace
#0 src/XF/Mvc/Entity/Entity.php(575): XF\Mvc\Entity\Entity->_castValueToType(NULL, 'post_id', 2, Array)
#1 src/XF/Mvc/Entity/Entity.php(505): XF\Mvc\Entity\Entity->set('post_id', NULL)
#2 src/addons/DBTech/Credits/BbCode/Charge.php(63): XF\Mvc\Entity\Entity->__set('post_id', NULL)
#3 [internal function]: DBTech\Credits\BbCode\Charge::charge(Array, '2', Array, Array, Object(XF\BbCode\Renderer\SimpleHtml))
#4 src/XF/BbCode/Renderer/Html.php(246): call_user_func(Array, Array, '2', Array, Array, Object(XF\BbCode\Renderer\SimpleHtml))
#5 src/XF/BbCode/Traverser.php(54): XF\BbCode\Renderer\Html->renderTag(Array, Array)
#6 src/XF/BbCode/Traverser.php(30): XF\BbCode\Traverser->renderSubTree(Array, Array)
#7 src/XF/BbCode/Traverser.php(18): XF\BbCode\Traverser->renderAst(Array, Object(KL\EditorManager\XF\BbCode\RuleSet), Array)
#8 src/XF/SubContainer/BbCode.php(216): XF\BbCode\Traverser->render('[charge=2]tset ...', Object(XF\BbCode\Parser), Object(KL\EditorManager\XF\BbCode\RuleSet), Array)
#9 src/XF/Service/Message/Preparer.php(255): XF\SubContainer\BbCode->render('[charge=2]tset ...', 'simpleHtml', 'post:prepare', Object(Siropu\AdsManager\XF\Entity\Post))
#10 src/XF/Service/Message/Preparer.php(121): XF\Service\Message\Preparer->checkValidity('[charge=2]tset ...')
#11 src/XF/Service/Post/Preparer.php(98): XF\Service\Message\Preparer->prepare('[charge=2]tset ...', true)
#12 src/XF/Service/Thread/Creator.php(148): XF\Service\Post\Preparer->setMessage('[charge=2]tset ...', true, true)
#13 src/XF/Pub/Controller/Forum.php(529): XF\Service\Thread\Creator->setContent('test', '[charge=2]tset ...')
#14 src/XF/Pub/Controller/Forum.php(715): XF\Pub\Controller\Forum->setupThreadCreate(Object(XF\Entity\Forum))
#15 src/XF/Mvc/Dispatcher.php(249): XF\Pub\Controller\Forum->actionPostThread(Object(XF\Mvc\ParameterBag))
#16 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:Forum', 'PostThread', 'json', Object(XF\Mvc\ParameterBag), 'forums', Object(XF\Pub\Controller\Forum), NULL)
#17 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#18 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#19 src/XF.php(329): XF\App->run()
#20 index.php(13): XF::runApp('XF\\Pub\\App')
#21 {main}

Request state
array(4) {
  ["url"] => string(31) "/forums/requests.60/post-thread"
  ["referrer"] => string(53) "/forums/requests.60/post-thread"
  ["_GET"] => array(1) {
    ["forums/requests_60/post-thread"] => string(0) ""
  }
  ["_POST"] => array(9) {
    ["title"] => string(4) "test"
    ["message_html"] => string(35) "<p>[charge=2]tset test[/charge]</p>"
    ["tags"] => string(0) ""
    ["_xfSet"] => array(1) {
      ["watch_thread"] => string(1) "1"
    }
    ["poll"] => array(5) {
      ["question"] => string(0) ""
      ["new_responses"] => array(1) {
        [0] => string(0) ""
      }
      ["max_votes_type"] => string(6) "single"
      ["change_vote"] => string(1) "1"
      ["view_results_unvoted"] => string(1) "1"
    }
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(31) "/forums/requests.60/post-thread"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
This has already been fixed. Please re-download v5.1.0 RC1 and re-upload the files.
 
Hello @Mr.Alhabash,

We hope your ticket regarding DragonByte Credits has been addressed to your satisfaction. This ticket has now been closed.

If your ticket has not been resolved, you can reply to this thread at any point in the next 7 days in order to reopen the ticket, afterwards this thread will be closed.

Please do not reply to this thread if your ticket has been resolved.

Thank you.


- DragonByte Technologies, Ltd.
 
Status
Not open for further replies.

DragonByte Credits

XenForo 1.5.3+ XenForo 2.0.x XenForo 2.1.x XenForo 2.2.x XenForo 2.3.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
4,973
Customer rating
5.00 star(s) 5 ratings
Back
Top