]> git.mxchange.org Git - friendica.git/commitdiff
bug #183 - strlen borking on sysmsg, which is now an array
authorFriendika <info@friendika.com>
Thu, 20 Oct 2011 21:55:40 +0000 (14:55 -0700)
committerFriendika <info@friendika.com>
Thu, 20 Oct 2011 21:55:40 +0000 (14:55 -0700)
boot.php
mod/install.php

index b846bcd08a61acd8dcbba683f97f8655cb913dc3..017e21814bea43b2f61f5586d32ea61809e9b894 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -8,7 +8,7 @@ require_once("include/pgettext.php");
 require_once('include/nav.php');
 
 define ( 'FRIENDIKA_PLATFORM',     'Free Friendika');
-define ( 'FRIENDIKA_VERSION',      '2.3.1139' );
+define ( 'FRIENDIKA_VERSION',      '2.3.1140' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.21'    );
 define ( 'DB_UPDATE_VERSION',      1097      );
 
@@ -238,7 +238,7 @@ class App {
        public  $contacts;
        public  $page_contact;
        public  $content;
-       public  $data;
+       public  $data = array();
        public  $error = false;
        public  $cmd;
        public  $argv;
@@ -251,7 +251,7 @@ class App {
        public  $timezone;
        public  $interactive = true;
        public  $plugins;
-       public  $apps = Array();
+       public  $apps = array();
        public  $identities;
 
        private $scheme;
index 27cc6af840e654d10e6f1758120bd70876af415c..78e537cfe261a82ec4d0c56fb9ad5d5fe3c0908d 100644 (file)
@@ -52,7 +52,7 @@ function install_post(&$a) {
 
        $result = file_put_contents('.htconfig.php', $txt);
        if(! $result) {
-               $a->data = $txt;
+               $a->data['txt'] = $txt;
        }
 
        $errors = load_database($db);
@@ -107,7 +107,7 @@ function install_content(&$a) {
        if(strlen($o))
                return $o;
 
-       if(strlen($a->data)) {
+       if(strlen($a->data['txt'])) {
                $o .= manual_config($a);
                return;
        }
@@ -203,7 +203,7 @@ function check_funcs() {
        if(! function_exists('mb_strlen'))
                notice( t('Error: mb_string PHP module required but not installed.') . EOL);
        
-       if((x($_SESSION,'sysmsg')) && strlen($_SESSION['sysmsg']))
+       if((x($_SESSION,'sysmsg')) && is_array($_SESSION['sysmsg']) && count($_SESSION['sysmsg']))
                notice( t('Please see the file "INSTALL.txt".') . EOL);
 }
 
@@ -224,7 +224,7 @@ function check_htconfig() {
 
        
 function manual_config(&$a) {
-       $data = htmlentities($a->data);
+       $data = htmlentities($a->data['txt']);
        $o = t('The database configuration file ".htconfig.php" could not be written. Please use the enclosed text to create a configuration file in your web server root.');
        $o .= "<textarea rows=\"24\" cols=\"80\" >$data</textarea>";
        return $o;