drmike, I got precisely the same error as suleiman... Here's the code (line 77 with "-->" added)
function my_themes() {
$this->get_all_themes();
$page = $_GET['page'];
switch ($_GET['action']) {
//Important TODO: make sure to strip ..'s and such
case 'edit':
if (get_option('ut_use_use_theme') != 1)
$this->flip_mode();
header("Location: /wp-admin/theme-editor.php?theme={$_GET['theme']}");
break;
case 'copy':
$copyTheme = $_GET['theme'];
if (!isset($copyTheme)) {
$message = "Error: No theme selected";
return;
}
$dest = $this->get_user_theme_root() . '/' . $copyTheme ;
while (file_exists($dest . $suffix))
$suffix = $suffix + 1;
--> mkdir($dest . $suffix, 0777, true);
$src = $this->get_system_theme_root() . '/' . $copyTheme;
exec("/bin/cp -R $src/* $dest$suffix");
exec("/bin/chmod -R 777 $dest$suffic"); //This is terrible
if (count($this->userThemes) == 1) {
//This is the first theme, so prepare the db for the switch
$keys = array_keys($this->userThemes);
update_option('ut_backup_user_template', $this->userThemes[$keys[0]]['Template']);
update_option('ut_backup_user_stylesheet', $this->userThemes[$keys[0]]['Stylesheet']);
}