Skip to content

Commit

Permalink
Merge pull request #10 from thorbenheins/thorbenheins-php-min-version
Browse files Browse the repository at this point in the history
Thorbenheins php min version implemented.
  • Loading branch information
jens-maus committed Nov 14, 2015
2 parents f297094 + c0739fb commit ee84121
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ Features:

This version of carddav2fb is a forked version from carlos22 (https://github.com/carlos22/carddav2fb) with certain updates applied which had been published at http://www.ip-phone-forum.de/showthread.php?t=267477. In addition to being compatible to newer FRITZ!OS versions it also features a bunch of bug fixes.

## Requirements

PHP version 5.3.6 or higher is required.

## Installation

Checkout the carddav2fb sources including its related subprojects using the following command:
Expand Down
7 changes: 7 additions & 0 deletions carddav2fb.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@
error_reporting(E_ALL);
setlocale(LC_ALL, 'de_DE.UTF8');

$php_min_version = '5.3.6';

if (version_compare(PHP_VERSION, $php_min_version) < 0) {
print 'ERROR: PHP version '.$php_min_version.' is required. Found version: ' . PHP_VERSION . PHP_EOL;
exit(1);
}

require_once('lib/CardDAV-PHP/carddav.php');
require_once('lib/vCard-parser/vCard.php');
require_once('lib/fritzbox_api_php/fritzbox_api.class.php');
Expand Down

0 comments on commit ee84121

Please sign in to comment.