Skip to content
This repository has been archived by the owner on Nov 5, 2018. It is now read-only.

Commit

Permalink
Fix memory checking for some users
Browse files Browse the repository at this point in the history
  • Loading branch information
megawebmaster committed Jul 21, 2014
1 parent 233d587 commit a2eb0dc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Changelog

* 1.10.1 - 2014-07-21:
* Fix: Memory checking for some users. Thanks to freyaluna for finding it.
* 1.10 - 2014-07-21:
* New: `jigoshop_countries::get_countries()` function - returns alphabetically sorted list of translated country names.
* New: `jigoshop_countries::has_country()` and `jigoshop_countries::has_state()` methods introduced.
Expand Down
16 changes: 9 additions & 7 deletions jigoshop.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* Description: Jigoshop, a WordPress eCommerce plugin that works.
* Author: Jigoshop
* Author URI: http://www.jigoshop.com
* Version: 1.10
* Version: 1.10.1
* Requires at least: 3.8
* Tested up to: 3.9.1
* Text Domain: jigoshop
Expand Down Expand Up @@ -83,13 +83,15 @@ function jigoshop_required_version(){
}

$ini_memory_limit = ini_get('memory_limit');
preg_match('/^(\d+)(.)$/', $ini_memory_limit, $memory);
preg_match('/^(\d+)(\s)*?$/', $ini_memory_limit, $memory);
$memory_limit = $memory[1];
switch($memory[2]){
case 'M':
$memory_limit *= 1024;
case 'K':
$memory_limit *= 1024;
if (isset($memory[2])) {
switch ($memory[2]) {
case 'M':
$memory_limit *= 1024;
case 'K':
$memory_limit *= 1024;
}
}
if($memory_limit < JIGOSHOP_REQUIRED_MEMORY*1024*1024){
add_action('admin_notices', function() use ($ini_memory_limit){
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: Jigoshop
Tags: ecommerce, wordpress ecommerce, store, shop, shopping, cart, checkout, widgets, reports, shipping, tax, paypal, jigoshop, shipping, inventory, stock, online, sell, sales, weights, dimensions, configurable, variable, downloadable, external, affiliate, download, virtual, physical
Requires at least: 3.8
Tested up to: 3.9.1
Stable tag: 1.10
Stable tag: 1.10.1

A feature-packed eCommerce plugin built upon WordPress core functionality ensuring excellent performance and customizability.

Expand Down Expand Up @@ -113,6 +113,9 @@ However, if you want priority, dedicated support from Jigoshop staff, we dp offe

== Changelog ==

= 1.10.1 - 2014-07-21 =
* Fix: Memory checking for some users. Thanks to freyaluna for finding it.

= 1.10 - 2014-07-21 =
* New: `jigoshop_countries::get_countries()` function - returns alphabetically sorted list of translated country names.
* New: `jigoshop_countries::has_country()` and `jigoshop_countries::has_state()` methods introduced.
Expand Down

0 comments on commit a2eb0dc

Please sign in to comment.