steverobbins / Magento-Redismanager

Superuser control for Redis in Magento
137 stars 31 forks source link

Undefined index: rdb_last_save_time #3

Closed vincenthfrance closed 10 years ago

vincenthfrance commented 10 years ago

Hello

I have check system.log in var/log and i see this error

ERR (3): Notice: Undefined index: rdb_last_save_time in app/design/adminhtml/default/default/template/steverobbins/redismanager/manager.phtml on line 114

Best regards

sorry for my english

tegansnyder commented 10 years ago

@xilox75

rdb_last_save_time: Epoch-based timestamp of last successful RDB save

I'm guessing if it is not set then you haven't saved anything.

you could get rid of the notice by adding a conditional to check if it is set:

<?php 
if (isset($_info['rdb_last_save_time'])) {
    echo $_coreHelper->formatTime($_date->timestamp($_info['rdb_last_save_time']), Mage_Core_Model_Locale::FORMAT_TYPE_LONG);
}
?>
steverobbins commented 10 years ago

I'm thinking "Last Save" could be removed entirely since it seems to always be the current time. Though I guess it could indicate a problem if it's not being updated regularly.

steverobbins commented 10 years ago

It looks like new fields were made available in Redis v2.4. I noticed the same issue in a 2.2 installation. Peak memory usage is also missing.