Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Error Checking for Upgrades after Aborted (?) upgrade
 
Tensor
Jr. Member
 
Total Posts:  7
Joined:  2008-06-14
 

I tried to upgrade my installation to version 1.1 by updating Mage_All_Latest in the downloader, but after a while nothing was happening and I refreshed the page even though I was getting a warning about a PEAR process being incomplete. I checked the admin page, and it said Magento 1.1.1 at the bottom, but apparently not everything had updated because there were no changes reflected in the frontend.

So I clicked “Check For Updates: and I received this error:

Warningin_array(): Wrong datatype for second argument in /backup/hsphere/local/home/code15clothing/code15clothing.com/downloader/pearlib/php/PEAR/REST/10.php on line 671

Backtrace
:

#0 /backup/hsphere/local/home/code15clothing/code15clothing.com/downloader/pearlib/php/PEAR/REST/10.php(671): mageCoreErrorHandler(2, 'in_array(): Wro...', '/backup/hsphere...', 671, Array)
#1 /backup/hsphere/local/home/code15clothing/code15clothing.com/downloader/pearlib/php/PEAR/Command/Remote.php(689): PEAR_REST_10->listLatestUpgrades('stable', false)
#2 /backup/hsphere/local/home/code15clothing/code15clothing.com/downloader/pearlib/php/PEAR/Command/Common.php(285): PEAR_Command_Remote->doListUpgrades('http://connect....', 'stable', Array, 'connect.magento...', Object(Maged_Pear_Registry))
#3 /backup/hsphere/local/home/code15clothing/code15clothing.com/downloader/Maged/Pear.php(228): PEAR_Command_Common->run('list-upgrades', Array, Array)
#4 /backup/hsphere/local/home/code15clothing/code15clothing.com/downloader/Maged/Model/Pear.php(94): Maged_Pear->run('list-upgrades', Array, Array)
#5 /backup/hsphere/local/home/code15clothing/code15clothing.com/downloader/template/pear/packages.phtml(43): Maged_Model_Pear->getAllPackages('list-upgrades', Array)
#6 /backup/hsphere/local/home/code15clothing/code15clothing.com/downloader/Maged/View.php(53): include('/backup/hsphere...')
#7 /backup/hsphere/local/home/code15clothing/code15clothing.com/downloader/Maged/Controller.php(107): Maged_View->template()
#8 /backup/hsphere/local/home/code15clothing/code15clothing.com/downloader/Maged/Controller.php(344): Maged_Controller->pearPackagesAction('pear/packages.p...')
#9 /backup/hsphere/local/home/code15clothing/code15clothing.com/downloader/Maged/Controller.php(164): Maged_Controller->dispatch()
#10 /backup/hsphere/local/home/code15clothing/code15clothing.com/downloader/index.php(29): Maged_Controller::run()
#11 {main}
After that, I clicked reinstall on each package individually, and it now appears that everything is updated to 1.1, but I’m still getting this error when I click check for updates.Any ideas what’s happened and if its fixable? Or is it worrying enough that I should start with a fresh 1.1 installation?
 
Magento Community Magento Community
Magento Community
Magento Community
 
Tensor
Jr. Member
 
Total Posts:  7
Joined:  2008-06-14
 

A little more insight into my problem. I made the problem “go away” by modifying one line in 10.php:

function betterStates($state$include false)
    
{
        
static $states = array('snapshot''devel''alpha''beta''stable');
        
$i array_search($state$states);
        if (
$i === false{
            
return false//<------this line
        
}
        
if ($include{
            $i
--;
        
}
        
return array_slice($states$i 1);
    
}
Since the return of this function was going to the second argument in in_array (which expects an array), it was generating my error. So I’m guessing that $i==false isn’t supposed to be tripped in normal operation (or else the developers would have noticed this problem). I’d like to find out what value $state has, but I don’t know how I should go about doing that (any php debugging tips anyone?) I’ll probably also try to figure out where $state comes from (a bad database entry maybe?)

Oh, and to get rid of the error, I replace return false; with return array();

 
Magento Community Magento Community
Magento Community
Magento Community
 
tunersedge
Jr. Member
 
Avatar
Total Posts:  16
Joined:  2008-01-29
 

Very interesting. I’m having the exact same problem. However, I’m not a very good php programmer, and haven’t gone this deep into the debug. Each time I see it frozen (5 min with no further installs), I refresh the page. Then I let it run magento-core/Mage_All_Latest again. Some new upgrades are registered, then it freezes again.

I’m not exactly sure what outcome your change is supposed to have, but I’m not seeing a difference. Still freezing up. I’m going to revert back to the original code and leave it be for now.

Anyone else experiencing this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Smokersroom
Member
 
Total Posts:  63
Joined:  2007-09-04
 

Tensor’s fix worked for me!

Concerned that it should need to be edited, but hey. Not complaining.

S.

 
Magento Community Magento Community
Magento Community
Magento Community
 
andrewporter
Jr. Member
 
Avatar
Total Posts:  14
Joined:  2008-11-10
 

Tensor,
Thanks for the info -worked for me as well - I now have one problem left - in system config I get the following message-
Warning: include(Mage/Adminhtml/Model/System/Config/Source/Locale/Weekdays.php)
I have upgraded to 1.1.8 any ideas anyone.
I am on heart internet so do not have SSH access!
Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top