What are common mistakes to avoid when working with JURI activation in PHP for Joomla?

One common mistake to avoid when working with JURI activation in PHP for Joomla is not properly checking if the JURI object is activated before using it. This can lead to errors or unexpected behavior in your Joomla extension. To solve this issue, always make sure to check if the JURI object is activated before using it in your code.

// Check if JURI object is activated before using it
if (class_exists('JURI')) {
    $uri = JURI::getInstance();
    // Use $uri object in your code
} else {
    // Handle the case where JURI object is not activated
}