Undefined index: custom_sidebars

Sounds like $my_theme_option has no ‘custom_sidebars’ index, if you’ve remove it, it does not exist anymore.

just add a if isset() around it, just like you did at around the for loop

Also you don’t need to check for functions like register_sidebar to exist if they are older then 2 years.

EDIT: DONT USE GLOBALS! There are functions for that e.g get_option()

    // CUSTOM SIDEBARS

    global $my_theme_option;

    if(isset( $my_theme_option[ 'custom_sidebars' ] )){

        $my_theme_custom_sidebars = $my_theme_option[ 'custom_sidebars' ];

        if ( sizeof( $my_theme_custom_sidebars ) > 0 ) {
            foreach ( (array)$my_theme_custom_sidebars as $sidebar ) {
                register_sidebar( array(
                    'name' => $sidebar,
                    'id'   => 'sidebar-' . $sidebar,
                    'before_widget' => '<div id="%1$s" class="widget %2$s">',
                    'after_widget' => '</div> <!-- end of widget -->',
                    'before_title' => '<h3 class="widget-title">',
                    'after_title' => '</h3>'
                ));
            }
        }
    }