Fixing some fatal errors

Recently I got to fix some older Drupal 6 site. It had WSOD so I needed to add this to index and then I saw sort of this error "Fatal error: Unsupported operand types in" so I used this post and added this code to the "l" function, and solved this bugger.

  if (!is_array($options)) {
    echo "
    $backtrace = debug_backtrace();