Gravity PDF - Version 4.2.1

Version Description

  • Bug: Fix fatal DateTimeZone error for older versions of PHP (GH#654)
Download this release

Release Info

Developer Blue Liquid Designs
Plugin Icon 128x128 Gravity PDF
Version 4.2.1
Comparing to
See all releases

Code changes from version 4.2.0 to 4.2.1

README.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://gravitypdf.com/donate-to-plugin/
5
  Tags: gravity, forms, pdf, automation, attachment, email
6
  Requires at least: 4.4
7
  Tested up to: 4.8
8
- Stable tag: 4.2.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl.txt
11
 
@@ -85,6 +85,9 @@ Also, if you enjoy using the software [we'd love it if you could give us a revie
85
 
86
  == Changelog ==
87
 
 
 
 
88
  = 4.2.0 =
89
  * Feature: Merge tags and shortcodes are displayed in the PDF for any administrative fields (GH#633)
90
  * Feature: New field class 'pagebreak' forces a pagebreak in the PDF (GH#634)
@@ -269,6 +272,9 @@ See [CHANGELOG.txt](https://github.com/GravityPDF/gravity-pdf/blob/master/CHANGE
269
 
270
  == Upgrade Notice ==
271
 
 
 
 
272
  = 4.2.0 =
273
  WARNING: The minimum WordPress version supported is now 4.4.
274
 
5
  Tags: gravity, forms, pdf, automation, attachment, email
6
  Requires at least: 4.4
7
  Tested up to: 4.8
8
+ Stable tag: 4.2.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl.txt
11
 
85
 
86
  == Changelog ==
87
 
88
+ = 4.2.1 =
89
+ * Bug: Fix fatal DateTimeZone error for older versions of PHP (GH#654)
90
+
91
  = 4.2.0 =
92
  * Feature: Merge tags and shortcodes are displayed in the PDF for any administrative fields (GH#633)
93
  * Feature: New field class 'pagebreak' forces a pagebreak in the PDF (GH#634)
272
 
273
  == Upgrade Notice ==
274
 
275
+ = 4.2.1 =
276
+ WARNING: The minimum WordPress version supported is now 4.4.
277
+
278
  = 4.2.0 =
279
  WARNING: The minimum WordPress version supported is now 4.4.
280
 
pdf.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  Plugin Name: Gravity PDF
4
- Version: 4.2.0
5
  Description: Automatically generate highly-customisable PDF documents using Gravity Forms.
6
  Author: Gravity PDF
7
  Author URI: https://gravitypdf.com
@@ -37,7 +37,7 @@ if ( ! defined( 'ABSPATH' ) ) {
37
  /*
38
  * Set base constants we'll use throughout the plugin
39
  */
40
- define( 'PDF_EXTENDED_VERSION', '4.2.0' ); /* the current plugin version */
41
  define( 'PDF_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); /* plugin directory path */
42
  define( 'PDF_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); /* plugin directory url */
43
  define( 'PDF_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); /* the plugin basename */
1
  <?php
2
  /*
3
  Plugin Name: Gravity PDF
4
+ Version: 4.2.1
5
  Description: Automatically generate highly-customisable PDF documents using Gravity Forms.
6
  Author: Gravity PDF
7
  Author URI: https://gravitypdf.com
37
  /*
38
  * Set base constants we'll use throughout the plugin
39
  */
40
+ define( 'PDF_EXTENDED_VERSION', '4.2.1' ); /* the current plugin version */
41
  define( 'PDF_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); /* plugin directory path */
42
  define( 'PDF_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); /* plugin directory url */
43
  define( 'PDF_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); /* the plugin basename */
src/helper/Helper_Logger.php CHANGED
@@ -10,6 +10,7 @@ use Monolog\Processor\IntrospectionProcessor;
10
  use Monolog\Processor\MemoryPeakUsageProcessor;
11
 
12
  use DateTimeZone;
 
13
  use GFLogging;
14
  use GFFormsModel;
15
 
@@ -134,8 +135,14 @@ class Helper_Logger {
134
  /* Set the logger timezone once (if needed) */
135
  if ( ! $timezone ) {
136
  $offset = get_option( 'gmt_offset' );
 
137
  if ( $offset != 0 ) {
138
- Logger::setTimezone( new DateTimeZone( ( $offset > 0 ) ? '+' . $offset : $offset ) );
 
 
 
 
 
139
  }
140
  $timezone = true;
141
  }
10
  use Monolog\Processor\MemoryPeakUsageProcessor;
11
 
12
  use DateTimeZone;
13
+ use Exception;
14
  use GFLogging;
15
  use GFFormsModel;
16
 
135
  /* Set the logger timezone once (if needed) */
136
  if ( ! $timezone ) {
137
  $offset = get_option( 'gmt_offset' );
138
+
139
  if ( $offset != 0 ) {
140
+ try {
141
+ $timezone = new DateTimeZone( ( $offset > 0 ) ? '+' . $offset : $offset );
142
+ Logger::setTimezone( $timezone );
143
+ } catch ( Exception $e ) {
144
+ /* do nothing */
145
+ }
146
  }
147
  $timezone = true;
148
  }
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitf5872687d39a9b6cbfc1950f8863b4c5::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitfe9e5b51941cafd836fe28a6375b8e31::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitf5872687d39a9b6cbfc1950f8863b4c5
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInitf5872687d39a9b6cbfc1950f8863b4c5
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitf5872687d39a9b6cbfc1950f8863b4c5', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitf5872687d39a9b6cbfc1950f8863b4c5', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInitf5872687d39a9b6cbfc1950f8863b4c5::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
@@ -48,19 +48,19 @@ class ComposerAutoloaderInitf5872687d39a9b6cbfc1950f8863b4c5
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
- $includeFiles = Composer\Autoload\ComposerStaticInitf5872687d39a9b6cbfc1950f8863b4c5::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
- composerRequiref5872687d39a9b6cbfc1950f8863b4c5($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
- function composerRequiref5872687d39a9b6cbfc1950f8863b4c5($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitfe9e5b51941cafd836fe28a6375b8e31
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInitfe9e5b51941cafd836fe28a6375b8e31', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInitfe9e5b51941cafd836fe28a6375b8e31', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInitfe9e5b51941cafd836fe28a6375b8e31::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
+ $includeFiles = Composer\Autoload\ComposerStaticInitfe9e5b51941cafd836fe28a6375b8e31::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequirefe9e5b51941cafd836fe28a6375b8e31($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
+ function composerRequirefe9e5b51941cafd836fe28a6375b8e31($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInitf5872687d39a9b6cbfc1950f8863b4c5
8
  {
9
  public static $files = array (
10
  'e9b046393eb3376a21bcc1a30bd2fe64' => __DIR__ . '/..' . '/querypath/querypath/src/qp_functions.php',
@@ -383,10 +383,10 @@ class ComposerStaticInitf5872687d39a9b6cbfc1950f8863b4c5
383
  public static function getInitializer(ClassLoader $loader)
384
  {
385
  return \Closure::bind(function () use ($loader) {
386
- $loader->prefixLengthsPsr4 = ComposerStaticInitf5872687d39a9b6cbfc1950f8863b4c5::$prefixLengthsPsr4;
387
- $loader->prefixDirsPsr4 = ComposerStaticInitf5872687d39a9b6cbfc1950f8863b4c5::$prefixDirsPsr4;
388
- $loader->prefixesPsr0 = ComposerStaticInitf5872687d39a9b6cbfc1950f8863b4c5::$prefixesPsr0;
389
- $loader->classMap = ComposerStaticInitf5872687d39a9b6cbfc1950f8863b4c5::$classMap;
390
 
391
  }, null, ClassLoader::class);
392
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitfe9e5b51941cafd836fe28a6375b8e31
8
  {
9
  public static $files = array (
10
  'e9b046393eb3376a21bcc1a30bd2fe64' => __DIR__ . '/..' . '/querypath/querypath/src/qp_functions.php',
383
  public static function getInitializer(ClassLoader $loader)
384
  {
385
  return \Closure::bind(function () use ($loader) {
386
+ $loader->prefixLengthsPsr4 = ComposerStaticInitfe9e5b51941cafd836fe28a6375b8e31::$prefixLengthsPsr4;
387
+ $loader->prefixDirsPsr4 = ComposerStaticInitfe9e5b51941cafd836fe28a6375b8e31::$prefixDirsPsr4;
388
+ $loader->prefixesPsr0 = ComposerStaticInitfe9e5b51941cafd836fe28a6375b8e31::$prefixesPsr0;
389
+ $loader->classMap = ComposerStaticInitfe9e5b51941cafd836fe28a6375b8e31::$classMap;
390
 
391
  }, null, ClassLoader::class);
392
  }