In a system with multiple hooks, why is my first hook the only one executed?
Oracle Service Cloud, all versions
In systems with multiple hooks, it is necessary to ensure that Message Base names are also not used as Variable Names. For statements such as the following:
$CUSTOM_MSG_ASK_ERROR_AANHEF_MISSING = RNCPHP\MessageBase::fetch(CUSTOM_MSG_ASK_ERROR_AANHEF_MISSING);
The php optimizer will replace the Variable Name with the optimized number for the Message Base name, providing unexpected behavior in Staging and Production Environments.
$(11876876)= RNCPHP\MessageBase::fetch( (11876876) );
In summary, the system will behave as intended in Development environments, where code is not optimized. The system will fail or behave unpredictably in Staging and Production environments where the code has been optimized.