As designed  Undefined variable: errorPhraseKey


Well-known member
At this line:
if (!$this->getInlineModTypeModel()->$functionName($ids, $options, $errorPhraseKey))
It seems XenForo_ControllerPublic_InlineMod_Abstract::executeInlineModAction doesn't define $errorPhraseKey. I added $errorPhraseKey = '' to the end and it seems to stop complaining, though not sure if I should pass it by reference or not but I don't see a difference on the front-end.


XenForo developer
Staff member
$errorPhraseKey should be passed by reference and defaulted to '' in the function signature for whatever you specify as $functionName - it's created on demand.
public function myFunction(array $ids, array $options = array(), &$errorPhraseKey, array $viewingUser = null)
See functions such as XenForo_Model_Thread::canEditPoll() and XenForo_Model_InlineMod_Post::deletePosts() for examples of this pattern in use.


Well-known member
I went back and actually did this and now it works, but I'm a bit confused as to what I actually did that wasn't working before. :confused:
I may need to sleep more often...