Support » Fixing WordPress » Can some one explain what I am doing wrong?

  • This keeps coming up as true. How ever the file contents do not change.

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

    Essentially this function is called to do an update of the theme. I thought I understood the codex but I guess not. Could some one expalin why this is returning true for uzipping files to specified directory?

    AISIS = the root of the Aisis Theme folder. It should unzip a zip file containing new files for the theme, over write old ones with the new ones and then return true. it returns true but it doesn’t over write the files with the new file.

    the old file was 1.0 before running this function, then after it was still 1.0 even though the new file that was suppose to over write the old file was 1.1…

    Could some explain what I am doing wrong?

Viewing 3 replies - 1 through 3 (of 3 total)
  • So I HAVE to double post im sure some mod will be like “no double posting” but w/e they can merge this:

    code for the problem above is: here

    So… why wouldn’t it return true? The only check that you’re doing is checking of the unzip function exists. You’re not checking the result of your call to that function so you will never know the actual result of the unzip function.

    What you need is to have something like:

    return unzip_file($path_to_file_to_unpack, $path_to_theme_dir_to_upgrade);

    That will return the result of that function call for you, and then you can see what is actually going on.

    Ahh thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can some one explain what I am doing wrong?’ is closed to new replies.