Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Commit

Permalink
Fixed a bug with php version 7. Fixes #13
Browse files Browse the repository at this point in the history
  • Loading branch information
749 committed Apr 6, 2017
1 parent 3f2cdfc commit 89c807d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion _build/build.transport.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

$modx->loadClass('transport.modPackageBuilder','',false, true);
$builder = new modPackageBuilder($modx);
$builder->createPackage('facebook_feed','0.2.8','beta');
$builder->createPackage('facebook_feed','0.2.9','beta');
$builder->registerNamespace('facebook_feed',false,true,'{core_path}components/facebook_feed/');

/* load action/menu */
Expand Down
5 changes: 5 additions & 0 deletions core/components/facebook_feed/docs/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Version 0.2.9-beta
==================
* Fixed a bug when using php 7 or newer
https://github.com/749/modx_facebook_feed/issues/13

Version 0.2.8-beta
==================
* Added an Events snippet to allow you to pull in facebook events
Expand Down
6 changes: 3 additions & 3 deletions core/components/facebook_feed/model/fb_feed/feed.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,10 @@ public function runEvents($scriptProperties) {

function txt2link($text, $attributes){
// force http: on www.
$text = ereg_replace( "www\.", "http://www.", $text );
$text = preg_replace( '/www\./', "http://www.", $text );
// eliminate duplicates after force
$text = ereg_replace( "http://http://www\.", "http://www.", $text );
$text = ereg_replace( "https://http://www\.", "https://www.", $text );
$text = preg_replace( '`http://http://www\.`', "http://www.", $text );
$text = preg_replace( '`https://http://www\.`', "https://www.", $text );

$attrs = '';
foreach ($attributes as $attribute => $value) {
Expand Down

0 comments on commit 89c807d

Please sign in to comment.