wpalchemy repeating fields dropdown issue

I changed the code to loop through all pages, instead of using wp_dropdown_pages() function.

Following is the new code

<?php while($mb->have_fields_and_multi('col2-project')): ?>
<?php $mb->the_group_open(); ?>

    <p>
        <span>Select Project</span>
        <?php $mb->the_field('project-id-2'); ?>
        <select name="<?php $mb->the_name(); ?>">
            <option value="">None</option>
            <?php
                global $thispost;
                $myposts = get_pages('post_type=portfolio&post_status=publish');

                foreach($myposts as $thispost) :
            ?>
            <option value="<?php echo $thispost->ID; ?>" <?php $mb->the_select_state($thispost->ID);?> ><?php echo get_the_title($thispost->ID); ?></option>

            <?php endforeach; ?>
            <?php setup_postdata($thispost);?>
       </select>
    </p>

<?php $mb->the_group_close(); ?>
<?php endwhile; ?>

Issue with the previous code was that there was no empty value, so every time a new value was saved when update button was clicked.

Now i have added <option value="">None</option> as default value.

error code: 523