Strange 4008 error (ERR_NOT_INITIALIZED_STRING)

 
Declare an extern string, a local string and initialize them as empty strings :

extern string ExtParam2 = "";
string Param4 = "";

If you call a function with ExtParam2, a 4008 error (ERR_NOT_INITIALIZED_STRING) is generated.
Why ??? ExtParam2 is initialized with an empty string !
The proof : if you call the same function with Param4, there is no error reported.


I join a a small program to reproduce this behavior.
I ever noted a problem with "string" input parameters (see "Problem when iCustom is called with an empty string") and I think these problems are linked.



//+------------------------------------------------------------------+
//|                                                         4008.mq4 |
//|                                                              EMM |
//|                                                                  |
//+------------------------------------------------------------------+
#property copyright "EMM"
#property link      ""

#property indicator_chart_window

//---- input parameters
extern string    ExtParam1;
extern string    ExtParam2 = "";
extern string    ExtParam3 = " ";


string           Param4    = "";


//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
{
   testCall( ExtParam1, "ExtParam1" );
   testCall( ExtParam2, "ExtParam2" );
   testCall( ExtParam3, "ExtParam3" );
   testCall( Param4,    "Param4" );

   return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
{

   return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
{

   return(0);
}



void testCall( string paramValue, string paramName )
{
   int lasterr = GetLastError();
   if( lasterr > 4000 )
   {
      Print( "( testCall() - ERROR )     GetLastError   : ",lasterr," for ",paramName," parameter !!);  
   } 
}

 
Fixed. Please wait for next build.
Reason: